We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://streamable.com/d7yt49
Right now, I want to move the yellow box, and not the black box.
local LocalPlayer = game:GetService("Players").LocalPlayer local Snapdragon = require(game.ReplicatedStorage:WaitForChild("Snapdragon")) local storeTbl = require(script:FindFirstChild("2dArray")) local InventoryFunc = require(script.InvMod) local controller2 = Snapdragon.createDragController(script.Parent.ItemPlaceholder) controller2:Connect() local prevIndex = 0 local function getIndex(number) if number == 1 then return 1, 1 elseif number == 2 then return 1, 2 elseif number == 3 then return 1, 3 elseif number == 4 then return 1, 4 elseif number == 5 then return 2, 1 elseif number == 6 then return 2, 2 elseif number == 7 then return 2, 3 elseif number == 8 then return 2, 4 end end controller2.DragEnded:Connect(function(callback) local d = script.Parent.ItemPlaceholder local closestObj = InventoryFunc:whichSlotisClosest(controller2.gui.AbsolutePosition) local indexNum = tonumber(closestObj.Name) local overlappingUIs = InventoryFunc:areFramesOverlapping(controller2.gui) if d:FindFirstChild("Config").Shape.Value == "Rect" then local indexNumber, indexNumber2 = getIndex(indexNum) if storeTbl[1][indexNumber2] == true and storeTbl[2][indexNumber2] == true then controller2.gui.Position = closestObj.Position storeTbl[1][indexNumber2] = false storeTbl[2][indexNumber2] = false if prevIndex ~= 0 then storeTbl[1][prevIndex] = true storeTbl[2][prevIndex] = true prevIndex = indexNumber2 else prevIndex = indexNumber2 end end end end) local controller = Snapdragon.createDragController(script.Parent.ItemPlaceholder2) controller:Connect() local prevIndex23, prevIndex12 = 0, 0 controller.DragEnded:Connect(function(callback) local d = script.Parent.ItemPlaceholder2 local closestObj = InventoryFunc:whichSlotisClosest(controller.gui.AbsolutePosition) local indexNum = tonumber(closestObj.Name) local overlappingUIs = InventoryFunc:areFramesOverlapping(controller.gui) if d:FindFirstChild("Config").Shape.Value == "Square" then local indexNumber, indexNumber2 = getIndex(indexNum) print(storeTbl) end end)
The text was updated successfully, but these errors were encountered:
My hierarchy: https://i.imgur.com/OKBrr8E.png
Sorry, something went wrong.
No branches or pull requests
https://streamable.com/d7yt49
Right now, I want to move the yellow box, and not the black box.
The text was updated successfully, but these errors were encountered: