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

How would I complete this code?

Asked by 9 years ago

I essentially want this new instance to be located inside a added player. I am not sure how you would do this though. I started the script below

game.Players.PlayerAdded:connect(function(player)
    local s = Instance.new("ScreenGui")
    s.Parent = --this line is incomplete as I didn't know how to add it to the newly joined player

1 answer

Log in to vote
1
Answered by 9 years ago

Something like this:

game.Players.PlayerAdded:connect(function(player)
    local S = Instance.new("ScreenGui", player.PlayerGui) --The parent is the player in question.
    S.Name = "Your_Gui_Name"
end)

:)

Ad

Answer this question