#help

1 messages · Page 1 of 1 (latest)

tiny mortar
#

I'm making a punch that deals knockback and damage, and the damage part works fine but when I try to implement the knockback and ragdoll it just doesnt work. I have the module scripts for the knockback and ragdoll, and I have a part that deals knockback and ragdoll that works perfectly. Can someone tell me how i could apply the knockback and ragdoll to the punch script? here is the script for the part that deals knockback: local part = script.Parent
local ragdoll = require(game:GetService("ServerScriptService").Main.Ragdoll)
local kb = require(game.ServerScriptService.Main.Knockback)

local db = {}
local hitboxcooldown = false

part.Touched:Connect(function(hit)
if table.find(db, hit.Parent) then return end
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
if hitboxcooldown then return end
hitboxcooldown = true

    table.insert(db, hit.Parent)
    kb.Start(hit.Parent, (hit.Parent.HumanoidRootPart.Position - part.Position).Unit * Vector3.new(30,30,30) + Vector3.new(0,40))
    ragdoll.Start(hit.Parent)
    task.wait(2)
    table.remove(db, table.find(db, hit.Parent))
    ragdoll.Stop(hit.Parent)
    hitboxcooldown = false
end

end)
and the one for the punch is the attached image

dull cape
#

first of all you do realize your debounce doesnt work right

#

idk if you read your script but it clearly has squiggly lines under it

#

cause you havent made the variable before checking the if statement as far as I can see here.

#

thats for the punch btw