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

How do you insert a local script into player gui?

I wanted to remove health, playerlist, and backpack. But it won't allow me to put it in there without me having to start a server and won't save. I used a script to switch the parent to playergui. Can you help me?

2 answers

✓ Accepted answer

You could put the Script in StartGui, if you mean the Player's PlayerGui, or you could make a script;

game.Players.PlayerAdded:connect(function(plr)
if plr and plr.PlayerGui then
find=script:FindFirstChild("LOCALSCRIPTNAMEHERE")
if find then
find:Clone()
find.Parent=plr.PlayerGui
end end end)

But if you mean a ScreenGui, that I can't really help with that, learning ScreenGui's myself. :P

I hope this helped!

4 comments

0

Very thank you!

0

No problem bro. ;)

0

But its saying that playergui is not valid member of player :L

0

If you have FilteringEnabled on, then thats what causing it, I dont know how and why it does that, but thats one of the main things that mess up scripts like this, if its not that, then I'm surely confused. :L

Anything located in the StarterGui service will be cloned into a player's PlayerGui whenever they spawn (this can be edited, but doesn't need to be right now, so no worries). Simply just put your script in there and it'll work just fine.

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