hmm im not sure about this but this is wut i no
put this in the torso and then disable it
function onTouched(hit)
local h = hit.Parent:findFirstChild("Humanoid")
if h ~= nil then
local pl = game.Players:findFirstChild(h.Parent)
if pl ~= nil then
local stat = pl:findFirstChild("leaderstat")
if stat ~= nil then
local ko = stat:findFirstChild("KO")
if ko ~= nil then
ko.Value = ko.Value +1
end
end
end
end
end
script.Parent.Touched:connect(onTouched)
then put this in the figure
while true do
wait()
if (script.Parent:findFirstChild("Humanoid").Health == 0) then
script.Parent.Torso.[name of script here].Disabled = false
end |