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

How do you insert a local script into player gui?

Asked by 9 years ago

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

Log in to vote
1
Answered by 9 years ago

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!

0
Very thank you! GreekGodOfMLG 244 — 9y
0
No problem bro. ;) TheeDeathCaster 2368 — 9y
0
But its saying that playergui is not valid member of player :L GreekGodOfMLG 244 — 9y
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 TheeDeathCaster 2368 — 9y
Ad
Log in to vote
0
Answered by
User#2 0
9 years ago

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.

Answer this question