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

Why won't this print a player's head's transparency when they join?

Asked by 8 years ago

This is a serverscript in Workspace, I dont get an error.

game.Players.PlayerAdded:connect(function(player)
if player.Character then
print(player.Character.Head.Transparency)
end
end)
0
I am getting a similar error, I have an if statement followed by 3-4 else-ifs, and none of the elseifs run, no errors in output either. Mowblow 117 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function()
        print(player.Character.Head.Transparency)
    end)
end)

Try this, It should work

Ad

Answer this question