if script.Parent.leaderstats.Money.Value >= 1 then
game.Workspace.ToEarth2.Position = Vector3.new(31.77, 1.1, -4.326)
end
I put this script into starter player scripts. Can anyone tell me what I am doing wrong?
if script.Parent.leaderstats.Money.Value >= 1 then
game.Workspace.ToEarth2.Position = Vector3.new(31.77, 1.1, -4.326)
end
I put this script into starter player scripts. Can anyone tell me what I am doing wrong?
You can do: The changed event will fire a function whenever the properties of an instance changes. This will check if the money changed and if it is over 1. If the money changed to over or equal to 1, it will change the position
script.Parent.leaderstats.Money.Changed:Connect(function()
if script.Parent.leaderstats.Money.Value >= 1 then
game.Workspace.ToEarth2.Position = Vector3.new(31.77, 1.1, -4.326)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
It did not work, so I did some testing. I made it print something when the function was triggered, but when I changed the value of money to be over 10, it didn't even print anything. Which means that for some reason, the function is not triggering.
Are you changing the value client side or server side?
Server side
Ok ill test it to see if it works
thanks
oops.... I put in the wrong location to teleport to. Sorry.