I'm trying to make a kill counter for my game WizardWars and so far I'm stuck and I don't know what to do I have LeaderStats and I clone my fireball.What I'm thinking is check if the ball is hit and hit.Parent:WaitForChild("Humanoid").Health and if the health = 0.But I'm stuck on how I can check the PlayerStats Because the Damage Script is in the Cloned FireBall.
So if anyone could help me that would be great!
Edit:It says you can't get owner is not a member of part here my update
wait(1)
local Kills = script.Parent.Owner.Value.leaderstats.Kills
local Dam = 10 -- Changre if want new damages
script.Parent.Touched:connect(function(hit)
print(hit.Parent)
local Human = hit.Parent:WaitForChild("Humanoid")
if Human then
print("Hit")
Human:TakeDamage(10)
if Human.Health <= 0 then
Kills = Kills + 1
end
wait()
script.Parent:Destroy()
end
wait(3)
script.Parent:Destroy()
end)
This is in a local script in the fireball.

2 comments
Post an attempt mate
I did