Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I access playergui through this script?

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.Haxxed:Clone().Parent = character.PlayerGui
    end)
end)

This doesn't work for some reason!

1 comment

0

Why not use StarterGui?

1 answer

Well, I see your issue. Here's your script fixed:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.Haxxed:Clone().Parent = player.PlayerGui -- The PlayerGui is inside the Player not Character.
    end)
end)

1 comment

0

Still should be using StarterGui

This discussion is preserved as it was. New answers, comments, and votes are closed.