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

Text is not positioned correctly?

Hello,

I want to make a gui that when you enter you need to press play like that, that's going all right and I figured it out how to work it out. But whenever I want to make my text position correctly, it appears centered in Roblox Studios but it's like not centered in Roblox.

I hope anyone can help me with this because it's really annoying that the text is centered in Roblox Studios but not in the game itself.(Don't tell me to Publish my game because I literally tried it for 10 times but still did'nt work. <-- Not mad )

Kind Regards, maup12345

1 comment

0

Did you position it with every tool window(explorer,properties, etc.)? if not, disable all of them and see what you get.

1 answer

✓ Accepted answer

The reason for this is probably because you aren't using scale, UDim2 values are set up like this

xScale,xOffset,yScale,yOffset -- side note: scales are in percents (ex. 0.75), and offsets are in pixels (ex. 25 would offset it by 25 pixels)

ex, if you have a position of UDim2.new(0.5,0,0.5,0) then the object's anchor point will be in the center of your screen (0.5 [aka 50 percent of screen]), if you had something like UDim2.new(0.5,0,0.5,5) the object's anchor point would be 5 pixels above the center of the screen

you need to use scale for some things because everyone's screen is different.

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