#Ragdoll

1 messages · Page 1 of 1 (latest)

late oak
#
How do i make a tool's hitbox ragdoll
script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid")then
        hit.Parent.Humanoid:TakeDamage(5)
    end        
end)

this is the code in it for damage, but I want it to ragdoll players aswell

south mango
#

What’s the parent

#

?

late oak
#

the parent is the Hitbox part which is in a tool called Bigmer

#

so it would be parent.parent

#

i did edit the script a bit

local Hammer = script.Parent.Parent

local Hitbox = script.Parent
Hitbox.CanTouch = false
Hammer.Activated:Connect(function()
    Hitbox.CanTouch = true
    
    task.wait(0.5)
    
    Hitbox.CanTouch = false

end)

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid")then
        hit.Parent.Humanoid:TakeDamage(5)
    end        
end) 
#

this just made it so it only damaged when in animation

late oak
south mango
#

@late oak

late oak
#

?

late oak