Spiyder1
(spi)
October 10, 2022, 8:35pm
#1
local pos = script.Parent.Position.Y
print(pos)
script.Parent:TweenPosition(
UDim2.new(1.1, 0, script.Parent.Position.Y, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Linear,
3,
false
)
I want to make the textlabel move from one side of the screen to the other, but I also want to randomize the y value. is there any way to do this?
Kaid3n22
(Kaiden)
October 10, 2022, 8:39pm
#2
Well, the title and the actual post say 2 different things, but I assume you want to use math.random()?
local pos = script.Parent.Position.Y
print(pos)
script.Parent:TweenPosition(
UDim2.new(1.1, 0, math.random(0,100)/100, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Linear,
3,
false
)
Spiyder1
(spi)
October 10, 2022, 9:29pm
#3
sorry, i was in a rush.
What I want to do is make it so the textlabel just goes across the screen on the x axis without changing the y axis. I want do that so that later I can make a math.random to assign the y value
script.Parent:TweenPosition(
UDim2.new(
1.1,
script.Parent.Position.X.Offset,
script.Parent.Position.Y.Scale,
script.Parent.Position.Y.Offset
),
Enum.EasingDirection.Out,
Enum.EasingStyle.Linear,
3,
false
)
This code should work, only changing the value of the X axis.
2 Likes