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

how do I change a textlabel size using a script ?

Asked by 4 years ago
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

Log in to vote
0
Answered by 4 years ago

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

0
i'd rather use scale AnasBahauddin1978 715 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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

0
That's scale, not offset Spjureeedd 385 — 4y

Answer this question