Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a ragdoll with impact sounds?

Asked by 5 years ago

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.

0
for the sound you can just use the touched event and debounce AlphaSpawn 4 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

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

Ad
Log in to vote
0
Answered by
KDarren12 705 Donator Moderation Voter
5 years ago
Edited 5 years ago

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.

Answer this question