How to get a Spesefic Player?
****Hello,
All what I wanna do is when the NPC died the player that killed that NPC get rewarded,
Because with my current script when the NPC dies everyone gets rewarded any help plz?
01 | local Stats = game.Players.LocalPlayer.leaderstats |
02 | local Gold = Stats.Gold |
05 | local hum = game.Workspace.Dummy.Dummy:FindFirstChild( "Humanoid" ) |
06 | player = game.Players.LocalPlayer |
07 | hum.Died:Connect( function () |
13 | print (player.Name.. "Killed it" ) |
15 | print ( "her is your reward" ..player.Name) |
17 | Gold.Value = Gold.Value + 50 |
18 | if player:FindFirstChild( "BruterTag" ) then |
19 | local BruterTag = player:FindFirstChild( "BruterTag" ) |
21 | if BruterTag.Value > = 1 then |
22 | BruterTag.Value = BruterTag.Value - 1 |
24 | else if BruterTag = = 0 then |
26 | local ir = Instance.new( "BoolValue" , player) |
27 | ir.Name = "FinishedBruterTag" |
29 | print ( "Script Finished Working" ) |