Does anyone know the full code for a death counter?

I am a new scripted and not sure how to make a death counter? Is there a certain place to put it or an official guide by Roblox on how? I am a new developer.

1 Like

It would be best to use the built in leaderboards; See In-Experience Leaderboards | Roblox Creator Documentation for more info on this.

You can create an IntValue in the leaderstats folder and update it every time the player dies, i.e. :

local deaths = -- Path to death count in the leaderstats folder
humanoid.Died:Connect(function()
    deaths = deaths + 1
end)

Thank you when I get back home I will update

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.