Okay so I got this and it works perfectly fine in testmode but it doesn't do anything at all in a normal server, does anyone know what is the problem?
player = game.Players.LocalPlayer
system = game.workspace.system
function onDeath()
system.playersalive.Value = system.playersalive.Value -1
player.CameraMode="Classic"
system.joindeadmsg.Value = player.Name .. " has died."
end
player.Character.Humanoid.Died:connect(onDeath)
OUTPUT:
14:46:41.106 - Players.Player1.PlayerGui.maingui.ondead:10: attempt to index field 'Character' (a nil value)
14:46:41.106 - Stack Begin
14:46:41.107 - Script 'Players.Player1.PlayerGui.maingui.ondead', Line 10
14:46:41.108 - Stack End

3 comments
I did that, but it didn't work and now don't get output at all
its because its still waiting for the character
try using the :FindFirstChild() event if not WaitForChild