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

how do I change a textlabel size using a script ?

game.StarterGui.ScreenGui.TextLabel.Size.X.Offset="100"

that is the script i use and I received an error saying, "Offset cannot be assigned to"

2 answers

✓ Accepted answer

this should be changed with Udim2 like this and change it in PlayerGui to let the player see the change like this

game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("ScreenGui").TextLabel.Size = UDim2.new(0,100,0,0)

the second and last values are offset for x and y

1 comment

0

i'd rather use scale

If your looking to use scale first you wanna find how big you want it to end off as. I'll use 0.3,0,0.13,0 for this

What you need to do is simple: GuiLocal.Size = UDim2.new(0.3,0,0.13,0)

for what your doing (In a local script anywhere):

local Plr = game.Players.LocalPlayer
local Gui = Plr.PlayerGui.ScreenGui.TextLabel

Gui.Size = UDim2.new(0.3,0,0.13,0)

Hope this helped

1 comment

0

That's scale, not offset

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