i want to do dis but idk how
when u die u get 1 death
if u get 5 deaths u get kick
also im ussing this script as leaderboard script
local Counter = "Deaths" game.Players.PlayerAdded:connect(function(Player) local leaderstats = Player:FindFirstChild('leaderstats') or Instance.new("Folder", Player) leaderstats.Name = "leaderstats" local deaths = leaderstats:FindFirstChild(Counter) or Instance.new("IntValue", leaderstats) deaths.Name = Counter deaths.Value = 0 Player.CharacterAdded:connect(function(Character) local d = true Character:WaitForChild("Humanoid").Died:connect(function() if (d) then d = false deaths.Value = deaths.Value + 1 end end) end) end)
help
To kick try this:
if deaths.Value >= 5 then Player:Kick("You have died too many times!") end