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

Text is not positioned correctly?

Asked by 5 years ago

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

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

1 answer

Log in to vote
0
Answered by
CPF2 406 Moderation Voter
5 years ago

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.

Ad

Answer this question