Hello there the users of devforum. I’ve created this script where it detects if a player has taken damage but sadly it doesn’t work as it doesn’t print. It doess not display an error aswell. Keep in mind this is my first time using remote events.
local function TookDamage(player)
player.CharacterAdded:Connect(function()
if player.Character then
local humanoid = player.Character.Humanoid
humanoid.HealthChanged:Connect(function()
if humanoid.Health <= 80 then
print("Player Incapacitated")
end
end)
end
end)
end
remoteEvent.OnServerEvent:Connect(TookDamage)