Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a leader-board counting down deaths in a game? [closed]

Asked by
Yes_Pez -3
4 years ago

I'm working on a small project with a focus of dying a bunch, so I need a leader-board that counts down how many times a player has died.

0
Dont post request questions, they'll probably be removed. However just create a folder and an int value and then shortly afterwards increase the int value using the Died event via player's humanoid. Mr_Unlucky 1085 — 4y

Closed as Not Constructive by Mr_Unlucky, namespace25, User#6546, Lugical, CPF2, Fifkee, SimplyRekt, GoldAngelInDisguise, Async_io, Programical, hiimgoodpack, and gskw

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 4 years ago

Learn about leaderboard creating here: https://developer.roblox.com/en-us/articles/Leaderboards

As for the deaths, you can set a player's death count by using the Humanoid.Died event.

For example,

plr=game.Players.LocalPlayer leaderstats=Instance.new('Folder',plr) deaths=Instance.new('IntValue',leaderstats) deaths.Name='Deaths' deaths.Value=0 char=plr.Character hum=char:FindFirstChild'Humanoid' if char and hum then hum.Died:connect(function() deaths.Value=deaths.Value+1 end end)

Ad