How do I do "StarterGui" for a specified player? ; How do I do "StarterGui" for a specified player?
COMMUNITY QUESTION
How do I do "StarterGui" for a specified player?
1 answer
It'd be good if you'd elaborate.
Here's the two things you might mean:
- PlayerGUI
Anything in StarterGUI is copied to this. It is in each player, provided their character has spawned.
It's just referenced by game.Players.PLAYERNAME.PlayerGUI.
- Choosing what each player gets as a StarterGUI
These wouldn't actually be put in StarterGUI. This'd be achieved by something like:
local gui1 = script.Parent.GUI1
local gui2 = script.Parent.GUI2
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
if p.Name == "CoolDude" then
gui1:Clone().Parent = p.PlayerGUI
else
gui2:Clone().Parent = p.PlayerGUI
end
end)
end)
Of course, this example is fairly basic, but hopefully you get the idea.
Thanks,
Explosion
This discussion is preserved as it was. New answers, comments, and votes are closed.
