The problem is that
the script doesn’t detect that the dummy is dead
i think the problem is that you one hit the dummy
I show you the problem with a video and the code is simple Dummy.Humanoid.Died:Connect(function()
this is what i DON’T want to have
if the dummy dies then its respawning and give you xp but it need to detect the dummy died and this doesn’t work
this is what i want but with one hit working too
the humanoid health is always going in to negative im using :TakeDamage() to do the damage
and no you can’t use HealthChanged because the script gives a player exp
here the script:
local Dummy = script.Parent
Dummy.Humanoid.Died:Connect(function()
for _,v in pairs(Dummy.Humanoid:GetChildren()) do
if v.Name ~= "Animator" then
if game.Players:FindFirstChild(v.Name).Stats.Level.Value < 1500 then
local player = game.Players:FindFirstChild(v.Name)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 7917326) then
game.Players:FindFirstChild(v.Name).Stats.EXP.Value = game.Players:FindFirstChild(v.Name).Stats.EXP.Value + 10
else
game.Players:FindFirstChild(v.Name).Stats.EXP.Value = game.Players:FindFirstChild(v.Name).Stats.EXP.Value + 5
end
end
end
end
end)
its in the dummy and its a normal script
to damage the dummys im using :TakeDamage()