Hello, I was wondering what would be the best and most easiest way to create a Ragdoll Push Tool?
Sort of saying, a tool that allows a player to push another player thats infront of them “triggering a ragdoll script”.
[NOTE] : I do have a Ragdoll script/module that is indead working.
How could I do so make a tool with such ability?
What I am wondering :
I am looking for more information on how I can make a tool, that
allows a player to push another player when they are in certain range, and they have waited the delayed amount of time. Also how could I basically toggle an event to trigger that module, then disable/rejoin all the players limbs?
What I have looked at :
Source 1, Source 2, Source 3. If anyone has any ideas from these sources, or deeply understand. I would love some explanation! Thank you!
1 Like
Make use of the Ragdoll HumanoidStateType enumeration. You can use it in conjunction with Humanoid:ChangeState() to set a character’s humanoid to ragdoll.
You could make the tool an invisible part with a Touched event.
1 Like
local players = game:GetService("Players")
local player = game.Players.LocalPlayer
local punchHandle = script.Parent
local clickDebounce = false
local hitDebounce = false
punchHandle.Equipped:Connect(function(mouse)
mouse.Button1Down:Connect(function()
if clickDebounce then
return
end
task.spawn(function()
clickDebounce = true
task.wait(1)
clickDebounce = false
end)
punchHandle.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
local char = hit.Parent
local plr = players:GetPlayerFromCharacter(char)
if plr == player then --punch tool is touching self so ignore
return
end
if hitDebounce then
return
end
task.spawn(function()
hitDebounce = true
local hum = char:WaitForChild("Humanoid")
hum:ChangeState(Enum.HumanoidStateType.Ragdoll)
task.wait(5)
hum:ChangeState(Enum.HumanoidStateType.PlatformStanding)
hitDebounce = false
end)
end
end)
end)
end)
You should be able to follow the logic in the above script, if you want to simulate the hit player being pushed you can change their HMR CFrame in the same direction in which they were hit by using the CFrame of the invisible punch tool itself.
3 Likes