Reputation: 91
Well, i need to know how to make this system for a game in Roblox, but i tried to use tag creator and this tag only works for tools, in this case i want to make skills and if a dummy dies the player receives a kind of reward. How i can make this? I have no idea, much less a code.
Upvotes: 0
Views: 119
Reputation: 533
In order to reward a player, you will just need to check if the player is dead whenever you deal damage to them. (That's the point of the tag creator system)
So in your skill script, whenever you have
humanoid:TakeDamage(1234)
-- insert check here, whether that be using the tag creator system or just doing manual checks
-- ex:
if humanoid:GetState() == Enum.HumanoidStateType.Dead then
playerWhoPerformedSkill.leaderstats.Cash.Value += 100 -- or whatever you want to do to reward!
end
Upvotes: 1