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!

3 comments
I'd suggest using Vector3 in this case instead of CFrame.
Thank you so much! This worked
i tried using vector3 in tweens before, and the tween will always end up in 0,0,0. However CFrame worked perfectly fine so i went with CFrame