Difference between starterGUI and playerGUI

i just have a question really; how come my frame size changes through playerGUI but not starterGUI? what’s the difference? thanks for the help!! :slight_smile:

like this would work and would change the size of my frame:

local UI = PlayerGui.ScreenGui
local frame:Frame = UI.demo

frame.Size = UDim2.new(100,0,100,0)

but for some reason this wouldnt change the size:

local UI2 = game.StarterGui.ScreenGui
local frame = UI2.demo

frame.Size = UDim2.new(100,0,100,0)

Every time you join a game all the GUIs in StarterGUI are copied to your player’s PlayerGUI folder. Therefor anything you change in StarterGUI wont replicate to anyone except for any new players that are joining.

(Might not be 100% correct on the technical side, but it gets the point across in a simple manner)

1 Like

Because whenever you run the game, everything inside of StarterGui replicates to the players inventory inside of PlayerGui, and any changes done to instances in the StarterGui won’t be shown because they’re a different version.
If you have the “ResetOnSpawn” property set to true, every time a player dies a new version replicates to their inventory.

1 Like

StarterGui is the folder where you place gui elements that will replicate (clone) into a player’s PlayerGui when the player joins. It is only in PlayerGui where any changes to the frames will be detected. The reason for replication is because there will usually be more than one person in the game and letting all of them control the gui’s in StarterGui will cause chaos, which is why you place them there to replicate to the player. Example:

Player A joins the game. Contents in StarterGui replicate to his PlayerGui. Player A will be seeing the frames in the PlayerGui and not StarterGui, which is why changing the elements in STarterGui does nothing. Like I said above, if every player saw what’s in StarterGui instead of PlayerGui, changing something meant for one player will be changed for everyone (not very peaceful)

Summary:
Changing StarterGui doesn’t work since it’s contents are not what the player is seeing, its the contents in PlayerGui the player is seeing. Changing something the player can’t see does nothing

2 Likes

@cakeycocoa @noril9 @MysteryX2076

from reading all your answers, i completely understand now. thank you so much for ur help guys; i really appreciate it. much love boys :+1:

2 Likes