I am trying to make a button that a player can press and then it immediately disappears so it cannot be pressed again, but when I try to change the coordinates of the part nothing happens. Nothing in the console, nothing.
script.Parent.ClickDetector.MouseClick:Connect(function(PlayerWhoClicked) local Coins = PlayerWhoClicked.leaderstats.Coins local Job = true while Job == true do Coins.Value = Coins.Value + 10 workspace.JobPart.Position = Vector3.new(0,100,0) wait(5) end end)
How do I change the position of the part? Thanks!
script.Parent.ClickDetector.MouseClick:Connect(function(PlayerWhoClicked) local Coins = PlayerWhoClicked.leaderstats.Coins local Job = true while Job == true do Coins.Value = Coins.Value + 10 workspace.JobPart.CFrame = CFrame.new(0,100,0) wait(5) end end)