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

Is there a way to add something to the player's head?

Asked by 3 years ago
game.Players.LocalPlayer.CharacterAdded:Connect(function(Player)
    local gui = Instance.new("BillboardGui", Player.Head)
    local Text = Instance.new("TextLabel", gui)
end)

I don't know how to get to the model of the player when the game starts. I only know how to get to the player in Players.

2 answers

Log in to vote
0
Answered by 3 years ago

You should use Player.Character. Heres an example of how to use it in your script:

game.Players.PlayerAdded:Connect(function(player)
    repeat wait() until player.Character
    local char = player.Character
    local gui = Instance.new("BillboardGui", char.Head)
    local Text = Instance.new("TextLabel", gui)
end)

Remember that the default for the size will be {0,0}, so you'll need to change that to be able to see it.

0
Thank you! NeoDogez 18 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

You can get the character with game.Players.LocalPlayer.character.

Answer this question