Works like a charm! I was wondering if you know how to make it use the module if the player dies/resets? I used this script inside of startercharacterscripts and it worked, but it plays the death sound twice. local module = require(game:GetService("ServerScriptService").RagdollModule) local character = script.Parent local hum = script.Parent:WaitForChild("Humanoid") character:WaitForChild("Humanoid").Died:connect(function() print("RAGDOLLING, PLAYER Died") local rig = module.new(hum.Parent,5) rig:Ragdoll() end) The debug print statement only prints 1 time when I die, is there something I missed? Thank you.
You don't have to pass anything in the new constructor of the module (the second argument which I explained which should be a number) and consider using :Once() instead of Connect(), try this and update me
-removed the redundant number - replaced the connect() for :Once() instead, I still hear it twice. Think it's how the humanoid is changing states maybe. Edit: I added a delay before rig:Ragdoll() then I reset.. As soon as I reset the death sound plays (1 time), but then plays AGAIN when the ragdoll occurs.
@@xare030 When died, add a listener for when the "died" sound is played in the HumanoidRootPart. When done playing, simply delete it. At the time writing this im now gonna test it out myself
@UnrealFlame Did it work? I was going with that method, was getting errors with deleting it properly, now I can't get back in studio, seems like there's outages.
@@xare030 I couldn't get it to work properly. My best guess is that it's something you just need to accept that it is just a thing you can't get rid off easily, or you will need to delete it before hand
W
Works like a charm! I was wondering if you know how to make it use the module if the player dies/resets?
I used this script inside of startercharacterscripts and it worked, but it plays the death sound twice.
local module = require(game:GetService("ServerScriptService").RagdollModule)
local character = script.Parent
local hum = script.Parent:WaitForChild("Humanoid")
character:WaitForChild("Humanoid").Died:connect(function()
print("RAGDOLLING, PLAYER Died")
local rig = module.new(hum.Parent,5)
rig:Ragdoll()
end)
The debug print statement only prints 1 time when I die, is there something I missed?
Thank you.
You don't have to pass anything in the new constructor of the module (the second argument which I explained which should be a number) and consider using :Once() instead of Connect(), try this and update me
-removed the redundant number
- replaced the connect() for :Once() instead,
I still hear it twice. Think it's how the humanoid is changing states maybe.
Edit: I added a delay before rig:Ragdoll() then I reset.. As soon as I reset the death sound plays (1 time), but then plays AGAIN when the ragdoll occurs.
@@xare030 When died, add a listener for when the "died" sound is played in the HumanoidRootPart. When done playing, simply delete it. At the time writing this im now gonna test it out myself
@UnrealFlame Did it work? I was going with that method, was getting errors with deleting it properly, now I can't get back in studio, seems like there's outages.
@@xare030 I couldn't get it to work properly. My best guess is that it's something you just need to accept that it is just a thing you can't get rid off easily, or you will need to delete it before hand
could this work for explosions?
im making a non lethal explosion but i want it to have ragdoll
also RIP : emiliotigre2017
@@GardenEer-ey5km I mean, why wouldn't it work?
@@UnrealFlame idk im new to coding and i dont actually know how to do some stuff 🙃
@@GardenEer-ey5km check my channel, I have a tutorial on something very similar