I have a script that, if the gui element position reach -2 in Y axis, it should Reposition it at 0,0,0,0
Why the script won’t work?
while true do
wait()
script.Parent.Position -= UDim2.new(0, 0, 0.02, 0) -- works
if script.Parent.Position.Y.Scale == -2 then -- problem
script.Parent.Position = UDim2.new(0, 0, 0, 0)
print("teleported to 0,0")
end
end