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

How do I get playergui using a Local script?

Ive tested alot of thing to try to get it but it all got an error everytime

1 comment

0

game.Players.LocalPlayer:WaitForChild("PlayerGui")

2 answers

You would use this:

wait(0.5)
local player = game.Players.LocalPlayer
local gui = player.PlayerGui

you can also do this instead of wait (0.5) to not cause any errors

local player = game.Players.LocalPlayer
local gui = player.PlayerGui:WaitForChild("your gui name here")

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