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

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

Asked by
woodengop 1134 Moderation Voter
9 years ago

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

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. M39a9am3R 3210 — 9y
0
oh kk thanks. woodengop 1134 — 9y

1 answer

Log in to vote
1
Answered by
yumtaste 476 Moderation Voter
9 years ago

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
Ok Thanks! +1 Point! woodengop 1134 — 9y
Ad

Answer this question