I don't know why it doesn't work
game.Players.PlayerAdded:connect(function(player)
Intro = script.Intro:Clone()
Intro.Screen.Frame.System.Disabled = false
Intro.Parent = player.PlayerGui
end)
I don't know why it doesn't work
game.Players.PlayerAdded:connect(function(player)
Intro = script.Intro:Clone()
Intro.Screen.Frame.System.Disabled = false
Intro.Parent = player.PlayerGui
end)
If your pathways are all correct (which only you can make sure of) then this should work fine:
game:GetService("Players").ChildAdded:connect(function(Player)
if Player:IsA("Player") then
repeat wait(1/30) until Player:findFirstChild("PlayerGui") and Player.Character ~= nil
Intro = script.Intro
Intro.Archivable = true
NewIntro = Intro:Clone()
NewIntro.Screen.Frame.System.Disabled = false
NewIntro.Parent = Player.PlayerGui
end
end)
If your script is server sided then you can change ChildAdded to PlayerAdded and (optionally) you can remove the if Player:IsA("Player") then and the corresponding end.
game.Players.PlayerAdded:connect(function(p)
--stuff
end)
Would work in a server script, or a workspace script, but not local, which I think is what you're trying to do.
I would try
game.Players.ChildAdded:connect
It runs on the workspace script so...
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
It might be worth mentioning that PlayerAdded doesn't work in a LocalScript, you have to use the ChildAdded event instead.
That will error if Player.PlayerGui doesn't exist yet.
Edited.