Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Moving frame help?

I have a frame in startergui and in the frame I have a imagelabel. So what this does it makes the frame move from left to right and continuing. I want it to hit the left side of the screen and not come back.

Startposition=script.Parent.Position

while true do
    local RightBorder=script.Parent.AbsolutePosition.X+script.Parent.AbsoluteSize.X
    if RightBorder<=0 then
        script.Parent.Position=Startposition
    else
        script.Parent.Position=script.Parent.Position-UDim2.new(0.005,0,0,0)
    end
    wait()
end

1 comment

0

I'd recommend using tweenposition ;) http://wiki.roblox.com/index.php?title=TweenPosition

1 answer

✓ Accepted answer
script.Parent:TweenPosition(UDim2.new(-1,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,1,false)

To understand each argument check the wiki

http://wiki.roblox.com/index.php?title=TweenPosition

bool TweenPosition ( UDim2 endPosition, EasingDirection easingDirection = Out, EasingStyle easingStyle = Quad, float time = 1, bool override = false, void function() callback = nil )

This discussion is preserved as it was. New answers, comments, and votes are closed.