****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?
local Stats = game.Players.LocalPlayer.leaderstats
local Gold = Stats.Gold
wait(1)
local hum = game.Workspace.Dummy.Dummy:FindFirstChild("Humanoid")
player = game.Players.LocalPlayer
hum.Died:Connect(function()
print("Die")
print(player.Name.."Killed it")
print("her is your reward"..player.Name)
Gold.Value = Gold.Value + 50
if player:FindFirstChild("BruterTag") then
local BruterTag = player:FindFirstChild("BruterTag")
if BruterTag.Value >= 1 then
BruterTag.Value = BruterTag.Value -1
else if BruterTag == 0 then
BruterTag:Destroy()
local ir = Instance.new("BoolValue", player)
ir.Name = "FinishedBruterTag"
print("BruterTag")
print("Script Finished Working")
end
end
end
end)

3 comments
what? this would be better formatted as a comment
well, whatever
Punsh or Sword