Hi, this is the script I already have located in ‘ServerScriptService’. I know this script isn’t complete, I just don’t no how to make a player Ragdoll when they get hit. Any help is appreciated!
Script:
local tool = script.Parent
local handle = tool.Handle
local animationController = Instance.new("AnimationController", handle)
local swingAnimation = Instance.new("Animation")
swingAnimation.AnimationId = "rbxassetid://"
animationController:LoadAnimation(swingAnimation)
tool.Activated:Connect(function()
animationController:Play(swingAnimation)
end)
local function onCollision(otherPart)
local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
tool.Touched:Connect(onCollision)