How to make body parts move when hit?

hi. i wanna make an effect for my game. when the bullet hits a corpse it would move it
i’ve tried it before may times but fail. i need an example how games such as RON. or Crisis response that does this effect

  1. What do you want to achieve? i want to make an effect that would move the body when hit by a bullet

  2. What solutions have you tried so far? i’ve tried with velocities but i am unsuccessful because it wouldn’t move after laying on the ground

Example, WARNING it simulates gore

although its in 2D i’m just giving an example to make you understand on what i’m talking about.

also i’m still pretty new to this roblox devforum

You could try tweaking the Motor6D that corresponds to the body part that got hit

What is a corpse, a model or a player character?

if its a corpse, then its probably not moving with the velocity due to network ownership, so set that to nil and you’ll be fine.

If its a player, then (assuming you’re doing hit checks on server) you could fire a remote event to that player and then locally create a velocity to move the player back.

You should use a LinearVelocity which is relative to world so you can just set it to bullet.CFrame.LookVector * speed.

when i say corpses. i’m basically refering to dead bodies or parts of players/NPCs

huh. i’ve never heard of linearVelocity in my life before. ill try and learn what is that. thanks mate :slight_smile:

hey. uno again. can i ask you a question? i tried looking at tutorials and it’s very unclear how i can activate the LinearVelocity. If you could help me out that would be epic

Uh, you create a new LV and store it in a variable using Instance.new()

For best functioning I’d recommend setting MaxForce to math.huge.

After that set LV.RelativeTo to Enum.ActuatorRelativeTo.World

Then for actually setting the velocity you have a couple of options:

If you want the player hit to move backwards in the direction of the bullet, then you get the LookVector of the bullet and set the LV.VectorVelocity to LookVector * speed. Speed is how fast the push is.

Otherwise if you want them to go backwards relative to their own rotation you could set LV.VectorVelocity to hitPlayerCFrame.LookVector * -speed.

Both methods involve the LookVector, but its upto you whether you use the bullet’s or the player’s to get desired result.

ONE NOTE TO BE SURE: This has to be done on the client having network ownership of the body. If it is another player, this has to be done locally on their client to replicate properly. If its server then it should be done on the server.

oh thanks bro. i didn’t know. but i found a simple solution to my issue. i used BodyVelocity and making the maxForce to the max. and hten making the velocity to Head.CFrame.LookVector*speed

but incase if bodyVelocity gets so broken i might use linear velocity. i am aware the bodyVelocity has been deprecated. im still going to use it because it’s simple. thank you guys for helping :smiley:

1 Like

I get you, totally. Im still in love with BodyMovers… And no matter how many times I try using MoverConstraints, I still like BodyMovers… :sob:

I see many devs still using them even if those are “deprecated”, they even say they dont care if those are.

what the heck are bodyMover. i said BodyVelocity :sob: :sob:

BodyVelocity is a BodyMover… xD

image

oh now i understand now xd

(wqedqwesdqwesadqwesdqwesdqweasdqweasd)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.