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

how would i record if a player died in a game round or not?

Asked by 7 years ago
Edited 7 years ago

how would i record if a player died in a game round or not? i've lost my attempt to this due to studio issues.

0
There's a Died event to humanoids. M39a9am3R 3210 — 7y
0
@M39a9am3R thanks, i'll look into that. IfIWasntSoSwag 98 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Make a bool that sets to true when the round has started then use the plr.Humanoid.died() function. Once the player dies say if bool == true then to confirm a round is in session.

Wiki: http://wiki.roblox.com/index.php?title=API:Class/Humanoid/Died

01-- example
02bool = false
03 
04game.Players.PlayerAdded:connect(function(plr)
05    plr.CharacterAdded:connect(function(chr)
06        function roundstart()
07            if bool == false then
08                bool = true
09            end
10            wait(90) -- 1.5 mins
11            -- do whatever else
12        end
13 
14        function roundend()
15            if bool == true then
View all 34 lines...
  • I kinda just wrote that on ze fly so it may be incorrect in some parts
0
if u need to do something to verify whether they r in the match use a 'ready for match' gui and a bool value (object not made in the script) in the player in players which is true if they click ready for match. - bools save the day. - remember to use bools to debug fam. MrDefaultMan 113 — 7y
Ad
Log in to vote
0
Answered by
JuanCema -10
7 years ago

What I would do is insert something into the player, such as a value. Once the players health => 0, then you make the value 1 or something. Check at the end of the game everyone's tags. If you a player has a 2 value, then the were still alive. If the value is 1, then they died. Just a suggestion, but I'm looking into it.

0
alright IfIWasntSoSwag 98 — 7y

Answer this question