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

Drag dead bodies? How do I do so... ( ROBLOX )

Asked by 3 years ago

Alright, I'm a small scripter I'd say. I'm not the best but I've made a game before and right now I'm making danganronpa in roblox. It's been working out pretty well but then I came to a couple road blocks. ( HEADING )

I want to know how make it so you can drag dead bodies, I have a ragdoll script and I'm aware there has to be something like a local script in workspace and a script in server-script service, but how does one make one? I want to make it so when you do a prox promt then it'll make the player play a animation kinda like getting the body ready for dragging, I already have a blood script so that's not a consern- But there's no videos on how I'd do this, I've asked for help before and nobody really awnsered. ( QUESTION )

In short, how do you make it where you can drag a dead body that's ragdolled?

If you can help then please do!

0
Attach a rope constraint thats invisible to the dead player and the player thats dragging the dead player. 3F1VE 257 — 3y
0
Yes, but how would I approch that? Like make a script that makes a rope? darkkitten12345 8 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

when the body is ready for dragging, the game needs to do detect whether the player is close enough to the body to drag it (eg 5 studs) , for that you can use Magnitude.

I'm js gonna assume you gotta press 'E' to drag the body, since you mentioned you already have scripting knowledge making this shouldn't be difficult. you can use UserInputService.

once you press E and drag the body, i'm gonna assume that you're js gonna drag the body to whereever you go to. I don't actually know what to do here, but if I had to do it, i'll use a while loop and constantly tween the body to your humanoid at an approximate distance of 8 studs.

or you could use a rope constraint which is definitely a better idea. have one attachment attached to the HumanoidRootPart of the body and the other to your HRP, and there you go. When you one to stop dragging the body just destroy the rope constraint.

0
Thanks! darkkitten12345 8 — 3y
Ad

Answer this question