How to make a "Steal Time" script

I am making a time stealing game, I need help on how to make a time steal script.

(Basically when a player kills another player, the victim’s time becomes 0 and the killer get the victim’s time added to theirs.)

Example: https://gyazo.com/f8ce0224e1a7e9a0028da277b4811a81

Please help!

1 Like

All you do is make a tag value on the hit player then when he dies the tag will determine the player who killed him and will transfer his time value and add it to yours.

1 Like

Am not a scripter so I don’t know how to do that. :slightly_frowning_face:

1 Like

Sir this is a scripting help topic…

2 Likes

Oh my bad, what category should I place this topic on?

1 Like

Scripting Support category can be used to ask for help such as “how to do that”…

1 Like

You have the correct category.

2 Likes

Alright, I’ve changed the topic’s name to avoid confusion.

1 Like

Do you have the leaderstats/time values done already?

I suggest reading up on scripting before jumping right into the deep-end. This category is designed to house people with initial scripts that need support, not for people to spoon-feed code.

You can find resources here to help progress you:

If you are looking for someone to develop a script for you, please use the category sub-category hiring.

What you are looking for in general is binding a .Died event to the players humanoid

Humanoid | Roblox Creator Documentation to fire an event when ever a user dies. You can check for a instanced value, often named Creator inside the player’s character. This should be created when a player is damaged by another player, so you can tell who attacked who, as Roblox doesn’t have any method of telling you this. This creator script could be embedded in the sword script.

You can then access the leaderstats and manipulate the values based on this event.

2 Likes

Get the player from the character you killed, then somehow get the time of the player, then add it to the player who killed the character.

1 Like