attempt to index nil with 'Item' Help?
I have a inventory gui that I am making so you can move to "Sort" your inventory. It will not work, It always errors. Here is the script (Normal script inside text button):
01 | local MovingInventory = script.Parent.Parent.Parent.Parent.Parent.MovingInventory |
02 | local SlotMoving = script.Parent.Parent.Parent.Parent.Parent.MovingInventory |
04 | script.Parent.MouseButton 1 Click:Connect( function () |
05 | if MovingInventory.Value = = false then |
06 | MovingInventory.Value = true |
07 | SlotMoving.Value = script.Parent.Name |
08 | elseif MovingInventory.Value = = true then |
09 | MovingInventory.Value = false |
10 | game.ReplicatedStorage.Values:WaitForChild( "Item" ).Value = script.Parent.Parent:FindFirstChild(SlotMoving.Value).Item.Value |
11 | game.ReplicatedStorage.Values:WaitForChild( "Amount" ).Value = script.Parent.Parent:FindFirstChild(SlotMoving.Value).Amount.Value |
12 | script.Parent.Item.Value = script.Parent.Parent:FindFirstChild(SlotMoving.Value).Item.Value |
13 | script.Parent.Amount.Value = script.Parent.Parent:FindFirstChild(SlotMoving.Value).Amount.Value |
14 | script.Parent.Parent:FindFirstChild(SlotMoving.Value).Item.Value = game.ReplicatedStorage.Values.Item.Value |
15 | script.Parent.Parent:FindFirstChild(SlotMoving.Value).Amount.Value = game.ReplicatedStorage.Values.Amount.Value |
Thoughts, thanks!