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
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 )