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

I want to make a script fire on death but not when someone resets?

Asked by 6 years ago

Basically I'm making a money drop system. However I don't want people to abuse it by resetting so many times, I only want the money to drop when someone kills them.

I tried making it so that you cant reset at all, but I need to rename the humanoid and I used the humanoid in at least 30 other scripts so that's a big issue, and then I also had the idea of adding a string value into the player and when someone deals damage to someone else, that value changes, and the money drop system will only fire if that value isn't blank. Though I'd need to rewrite a lot of scripts... so is there any other effective way to do this?

1 answer

Log in to vote
3
Answered by
caoshen 96
6 years ago

You can use ResetButtonCallback to disable resetting in your game entirely:

game:GetService('StarterGui'):SetCore('ResetButtonCallback', false)

Alternatively, if you still want players to be able to reset, you can add values to the player after being hit by another player to determine if they actually were killed or not.

0
Cheers, had no clue ResetButtonCallBack was a thing. Kakitoku 32 — 6y
Ad

Answer this question