Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I improve this script for making my text change position?

Asked by 5 years ago

Here is my script

script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0), "In", "Back", 1)

How would I make tween position with a loop make a textlabel move from the center of the frame slide to the top left part of the frame

I’m trying to make it work yet it doesn’t how would I do this any ideas and thanks a lot for the help

0
Asking for improvements and asking for a fix are 2 different things. Don't ask 2 different questions in 1. programmerHere 371 — 5y
0
Sorry sir Eyelesstiamat 7 — 5y
0
I’ll try my best next time Eyelesstiamat 7 — 5y
0
Could you also show the rest of your script? Benbebop 1049 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Hello there pal!

Assuming you want a TextLabel to constantly tween in and out, I'll teach you something.

while loops loop the entire code encased in it to repeat itself over and over again without a stop. So, for example, I would do;

while true do
    print("Hello world!")
    wait(1) --The '1' can be replaced to how much delay time there is.
end

But I have to warn you, don't forget to place a 'wait' cooldown. If you don't, studio will either crash or halt the script to prevent lag.

Armed with this new method, let's go to your problem.

while true do -- infinite loop
    script.Parent:TweenPosition(UDim2.new(0,0,0,0),'In','Back',1)
    wait(1)
end

Voila! Fixed! Hopefully.

From your friend, Sensei_Developer

P.S, when developing on ROBLOX studio, try to always open the Output tab. If you don't know where it is, then go to View > Output. Prints, warns and errors will be displayed on this tab. Adios!

Ad

Answer this question