The name of my leaderstats is "Deaths".
this is the leaderstats script:
local players = game:GetService("Players") players.PlayerAdded:Connect(function(player) local lead = Instance.new("Folder") lead.Name = "leaderstats" lead.Parent = player local deaths = Instance.new("IntValue") deaths.Name = "Deaths" deaths.Parent = lead player.CharacterAdded:Connect(function(character) local hum = character:FindFirstChild("Humanoid") hum.Died:Connect(function() deaths.Value = deaths.Value +1 end) end) end)
Try:
local players = game:GetService("Players") players.PlayerAdded:Connect(function(player) local lead = Instance.new("Folder") lead.Name = "leaderstats" lead.Parent = player local deaths = Instance.new("IntValue") deaths.Name = "Deaths" deaths.Parent = lead player.CharacterAdded:Connect(function(character) local hum = character:FindFirstChild("Humanoid") hum.Died:Connect(function() deaths.Value = deaths.Value +1 end) end) deaths.Changed:Connect(function() if player.Name == 'name here' then -- Name for which player has the stats stay on deaths.Value = number which is stuck on end end) end)
Paste it