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

Why do you have to use game.Players.LocalPlayer for GUI Keydown Functions?

Why in the RBX Lua you have to put game.Players.LocalPlayer:WaitForChild("somegui"):WaitForChild("someframe") for A Keydown functions instead of game.StarterGui.somegui.someframe?

I'm not asking someone to create me a Script

2 comments

0

StarterGUI changes the Gui that can only be seen after respawning. PlayerGui which is located inside in this case "LocalPlayer" changes to a Gui in there will show immediately to the client.

0

oh kk thanks.

1 answer

✓ Accepted answer

StarterGui is the default storage that clones all the children of it and puts them in all of the players' PlayerGui. So, if you're editing properties of children of StarterGui, then the next time any player respawns, the changes will take effect. Kind of difficult to put it into words, but I hope you get it.

So, in a nutshell, StarterGui clones all of its children and puts them in players' PlayerGui.

1 comment

1

Ok Thanks! +1 Point!

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