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

How do I get playergui using a Local script?

Asked by 2 years ago

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

0
game.Players.LocalPlayer:WaitForChild("PlayerGui") NotThatFamouss 605 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

You would use this:

wait(0.5)
local player = game.Players.LocalPlayer
local gui = player.PlayerGui
Ad
Log in to vote
0
Answered by 2 years ago

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")

Answer this question