I have a script that slides a frame across the screen when it turns visible.
function changed()
local frm = script.Parent
if frm.Visible == true then
frm.Position = UDim2.new(0, 420, 0, 0)
local value = script.Value.Value
value = 0
repeat
wait(0.1)
value = value + 5
frm.Position = UDim2.new(0, 420, 0, (value))
until
value == 275
frm.Position = UDim2.new(0, 420, 0, 275)
end
end
script.Parent.Changed:connect(changed)
The frame goes to its starting position but the loop refuses to play. The script seems fine to me; what's wrong with it?

1 comment
Thanks!