Hi,
So the problem that I am facing is that I can’t one shot a dummy when I deal 100 or more damage. However, I can kill the dummy if I two shot him for example :99dmg + 99dmg and I want the dummy to be anchored. I believe that the problem is with my sword damage script but I can’t seem to find it.
Here is the sword damage script:
local DebonceTable = {}
local debounce = false
script.Parent.Activated:Connect(function()
if debounce == false then
debounce = true
local connection
connection = script.Parent:WaitForChild("Hitbox").Touched:Connect(function(hit)
if hit.Parent then
if hit.Parent:FindFirstChild("Humanoid") then
if game.Players:GetPlayerFromCharacter(hit.Parent) == nil then
if DebonceTable[hit.Parent] == true then return end
task.spawn(function()
hit.Parent.Humanoid:TakeDamage(script.Parent.Damage.Value)
wait(0.5)
debounce = false
end)
connection:Disconnect()
end
end
end
end)
end
end)