this is my code but I keep getting this error: ServerScriptService.Script:5: attempt to index nil with 'Character'
game.Players.PlayerAdded:Connect(function(player)
print(player.name "joined")
end)
if not player.Character then
print("waiting for character")
player.CharacterAdded:wait();
char = player.Character
else
char = player.Character
end

1 comment
Thank you this was really helpful!