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

How would i tween either X or Y without effecting the other?

For example this sets both the X and Y of the 'Ball'.

local Ball = script.Parent

while true do 
	wait(0.2)
	Ball:TweenPosition(UDim2.new(0,0,0.339,0),'Out','Linear',1)
end

2 comments

0

it's always like that though?

0

Ii dont know what you mean, I want to only set the X or Y of the 'Ball' so no matter where it is it goes down the screen or across the screen in a straight line.

1 answer

✓ Accepted answer

This should keep the X static.

local Ball = script.Parent

while true do 
    wait(0.2)
    Ball:TweenPosition(UDim2.new(0,Ball.AbsolutePosition.X,0.339,0),'Out','Linear',1)
end

This should keep the Y static.

local Ball = script.Parent

while true do 
    wait(0.2)
    Ball:TweenPosition(UDim2.new(0,0.339,Ball.AbsolutePosition.Y,0),'Out','Linear',1)
end

I hope this is what you ment.

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