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

is there a way to add a kill to leaderstats from a npc kill?

Asked by 5 years ago

i have a linked leaderboard in my game, i have NPC's, i want too make the players stats go up when/ if they kill an npc? any help wanted, thanks in advance

0
Show the leaderboard script at least so we have something to refer to like variable names. Thnx. Maginatoc -5 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

I'm thinking something along the lines of waiting such as pausing the script for that player for a while (max respawn time) and storing who dealt the most damage to the player beforehand and awarding them points as so.

You have a weapon don't you someone may need the damage script. Thank you have fun!

Ad
Log in to vote
0
Answered by 5 years ago

Insanely late but, you would need an event due to the fact you are triggering a leaderstat to increase. So you can't just do game.Players.playerwhokilled.leaderstats.Currency.Value = game.Players.playerwhokilled.leaderstats.Currency.Value + 1

You would have to trigger a remote event and THEN you can increase the value.

Answer this question