Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to end a round after AI is killed and award by damage dealed?

My question is simple, i already have a script wich is like the one used in disaster game(waittime, gametime and repeat...), but what i want to do now is after the ENEMY(an AI) health=0 the round ends and players get awarded by the damage dealed to ENEMY

how do i know the damage dealed by each player?

1 answer

You have to keep track of it. You must ensure that each weapon adds a tag to the AI's humanoid regarding how much damage it did and which player dealt that damage. Some script must "consume" these tags and keep a running total.

2 comments

0

@chess123mate hmm... a new value inside each player that stores the damage dealed. can work too?

0

Of course - so long as either the weapons increase those values directly or else generate tags that you can monitor and then increase the "damage dealt" values through another script.

This discussion is preserved as it was. New answers, comments, and votes are closed.