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

what is the difference between StarterGui and PlayerGui?

Asked by 6 years ago

What's the difference?

2 answers

Log in to vote
2
Answered by
Griffi0n 315 Moderation Voter
6 years ago

Each time a player joins the game the StarterGui's contents are cloned into that player's PlayerGui. The PlayerGui is the GUI that is displayed to the player and the player can interact with it. Examples:

game.StarterGui.ScreenGui.Label.Text = "Hello!" -- Wrong
game.Players.LocalPlayer.PlayerGui.ScreenGui.Label.Text = "Hello!" -- Correct
0
So if i have a intro GUI with that doesn't say start gui, but it says script.Parent, then is that correct? Or do i have to change it to player GUI? TheLightningRises 56 — 6y
0
It is correct to use the script.Parent method Griffi0n 315 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

In-Depth Answer (Probably easier to understand after you read the simple answer): Basically, StarterGui is just a folder that puts/clones each Gui into the PlayerGui folder of each player when they join, allowing the Guis to affect the players. What you need to know is that the StarterGui folder is where you put most of your Guis that you make. The PlayerGui folder (called PlayerGuis) is not the same as a PlayerGui, nor is it just for PlayerGuis, it is where the Guis in StarterGui are cloned into to allow the players to be affected. An actual PlayerGui is a type of Gui that applies to each individual player. So for instance, if you want a Gui to appear to each player when they join the server but you only want it to appear to that player and you don't want it to appear on every player's screen everytime a new person joins, then you would use a PlayerGui. A PlayerGui would be put into the StarterGui folder.

Simple Answer: In case that was a bit overexplained and confusing, here is the general idea. StarterGui is not a type of Gui, it is a folder in Studio where your Guis are placed into in order for them to be put into the players when they join the game And a PlayerGui is a type of Gui that affects the individual player, not the whole server.Hopefully, this will make the long answer make more sense.

I hope this answers your question. Good Luck :) Skyraider5

Answer this question