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

Gah! I decided to make a GUI thats purposly annoying at the begginging. Help??? [Solved it]

Asked by 3 years ago
Edited 3 years ago

So The GUI's positions are purposly centered in the middle of the screen as soon as the first person joins. However, when I play they are always on the side of the screen, here Is my code...

for i,v in pairs(game.Players:GetChildren()) do
if v:IsA("Player") then
wait(1)
v.PlayerGui.MainText.Frame.TextLabel.Text = "Hi!"
wait(1)
v.PlayerGui.MainText.Frame.TextLabel.Text = "Wait, Hold on..."
wait(1)
v.PlayerGui.MainText.Frame.TextLabel.Size = UDim2.new{0, 1, 0, 1}
wait(3)
v.PlayerGui.MainText.Frame.TextLabel.Position = UDim2.new{.5, 0, .5, 0}
wait()
end
end

Note: This only after the Size and Position are executed by the script

0
If its something obvious, its 3:33 in the morning, devils hour, and I'm tired ifreakinlostmyacount 52 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

You are using offset for the size, change it to scale try sm like {-- here,0,--here,0} Scale: Automatically changes the size of the GUI to the size of the device. Whereas offset doesn't

0
Its the fact that the local script is not apart of the GUI to stop the local script from overlapping itself when reseting, I did some research and its moving the points half way according to the GUI.size since its not a descendant of the GUI - Roblox Developer Hub ifreakinlostmyacount 52 — 3y
Ad

Answer this question