Your current script seems a bit messy, let's switch things up to make it look better:
wait(2)
script.Parent.Parent.Parent.Enabled = true
local B = game.workspace:WaitForChild('burger').Handle
B.Anchored = true
script.Parent.MouseButton1Down:Connect(function()
local CB = B:Clone()
wait(0.1)
CB.Position = Vector3.new(301.87, 7.692, 485.56)
CB.Anchored = false
CB.CanCollide = true
end)
Now this is much better, assuming this is a local script, it's not good to access parts with a local script. This won't work if you have FE enabled.
Now, the thing about your script is if nothing comes up in the output, you have to find where the code stops. So, you add prints.
wait(2)
script.Parent.Parent.Parent.Enabled = true
local B = game.workspace:WaitForChild('burger').Handle
B.Anchored = true
print('1')
script.Parent.MouseButton1Down:Connect(function()
local CB = B:Clone()
wait(0.1)
print('2')
CB.Position = Vector3.new(301.87, 7.692, 485.56)
CB.Anchored = false
CB.CanCollide = true
print('3')
end)
If all 3 prints, everything ran, meaning that it works. If it doesn't find out what you are doing wrong. Now, I have copied your script, meaning that this was based on your idea. I have helped you make your code better so that it will run smoother. If it doesn't work and doesn't print a part, find the error and post on this post and I will get back to you.
Good luck, I can only help you so far if there is no errors. Wish you luck!
1 comment
The clone requires a parent, which you never give it. "workspace.burger:Clone().Parent = workspace"