Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a ragdoll with impact sounds?

I've been trying to make a 'Realistic' roblox game, but i can't seem to make or edit a roblox ragdoll script so it has impact sounds when the ragdoll falls on the ground or gets hit by something. It would be a huge help if someone could at least give me a suggestion on what to edit or where to start.

1 comment

0

for the sound you can just use the touched event and debounce

2 answers

If you are trying to ragdoll with a button, for say, the button "G", use this code:

local s = Instance.new("Sound")
s.Parent = player.Character.Torso
s.SoundId = "rbxassetid://SOUNDHERE" -- put your sound id here
s.Looped = false
mouse.KeyDown:connect(function(key)
 If key == "g" then
     -- put the Ragdoll script here.
     s:Play()
     wait(2) -- cooldown so you cannot spam ragdoll or sounds
     
 end

Please tell me if this helped at all.

If you want the sound when the player gets hit by something, just use humanoid.Touched:Connect(function(hit) or something around those lines and play the sound. You can use this to learn about 'Touched' and if you want a sound to play when the player falls down, you can use humanoid state type in order to get the state where they fall down and play the sound.You can check here for the Humanoid.FallingDown and here to learn more about the humanoid state types also here to learn about getting the states of the humanoid

This discussion is preserved as it was. New answers, comments, and votes are closed.