gui = script.Parent.Parent Player = script.Parent.Parent.Parent.Parent.Touch.NameValue Sandwich = game.Lighting:FindFirstChild("Ham Sandwich") script.Parent.MouseButton1Down:connect(function() game.Workspace.Sandwich.Ham.Transparency = 0 for i = 1,36 do script.Parent.Parent.Parent.Parent.ClickBlock.CFrame = script.Parent.Parent.Parent.Parent.ClickBlock.CFrame-Vector3.new(0,-0.500,0) wait(0.033) game.Workspace.Sandwich.Ham.Transparency = 1 for _,gui in pairs(gui:GetChildren()) do gui.Visible = false local f = Sandwich:Clone() f.Parent = game.Players:FindFirstChild(Player.Value).Backpack end end end)
Thats the code
This is a fairly simple problem.
First of all, indent your code properly! Every statement that requires an end
increases the indentation by one layer:
gui = script.Parent.Parent Player = script.Parent.Parent.Parent.Parent.Touch.NameValue Sandwich = game.Lighting:FindFirstChild("Ham Sandwich") script.Parent.MouseButton1Down:connect(function() game.Workspace.Sandwich.Ham.Transparency = 0 for i = 1,36 do script.Parent.Parent.Parent.Parent.ClickBlock.CFrame = script.Parent.Parent.Parent.Parent.ClickBlock.CFrame-Vector3.new(0,-0.500,0) wait(0.033) game.Workspace.Sandwich.Ham.Transparency = 1 for _,gui in pairs(gui:GetChildren()) do gui.Visible = false local f = Sandwich:Clone() f.Parent = game.Players:FindFirstChild(Player.Value).Backpack end end end)
Now, it's obvious that the code giving you the tool is inside of two loops. None of that code should be nested:
gui = script.Parent.Parent Player = script.Parent.Parent.Parent.Parent.Touch.NameValue Sandwich = game.Lighting:FindFirstChild("Ham Sandwich") script.Parent.MouseButton1Down:connect(function() game.Workspace.Sandwich.Ham.Transparency = 0 for i = 1,36 do script.Parent.Parent.Parent.Parent.ClickBlock.CFrame = script.Parent.Parent.Parent.Parent.ClickBlock.CFrame-Vector3.new(0,-0.500,0) wait(0.033) end game.Workspace.Sandwich.Ham.Transparency = 1 for _,gui in pairs(gui:GetChildren()) do gui.Visible = false end local f = Sandwich:Clone() f.Parent = game.Players:FindFirstChild(Player.Value).Backpack end)