What do you want to achieve?
So there will be a baseball bat (as a tool) and when It hits a person, It will knockout the person that It hit and make the person go ragdoll, after 5 seconds the person will get back up.
What is the issue?
I don’t really know how to do It
What solutions have you tried so far?
I searched for topics like this on the forum but I couldn’t find any.
Well for starters, you could have a bat tool with a swing animation that plays whenever the tool is activated. Then, just use touched events to see if it hit a player. Here is an example:
bat.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
-- run code to ragdoll them, then have them get up.
end
end)
You would have to script some checks to see if it is activated. Like this:
local active = false
tool.Activated:Connect(function()
if not active then
active = true
wait(1)
active = false
end
end
bat.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if active then
-- run code to ragdoll them, then have them get up.
end
end
end)