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

How do I use UDim2?

I'm making a game and I'm trying to make the bar at the top of the screen say different sentences (This I know how to do), but I want to make it so that it doesn't just change, it should fly smoothly off the bar then another one should fly on. This is my current script:

StarterGui -> ScreenGui -> Frame -> TextBox -> Script

while true do
local GUI = script.Parent
GUI.Text = "Welcome to my game!"
wait(10)
-- Does more of these then it restarts
end

But how do you do it with UDim2? Can someone explain how to use it?

2 answers

UDim2.new(scaleX, offsetX, scaleY, offsetY)

I think that the scale values from UDim2 are values that will resize the GUI according to your screen size.

The position, you can just make the scales 0, and increase the offset by 10 each time the script runs.

1 comment

0

Thanks.

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