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

Detecting if a part is falling?

Asked by 3 years ago

I've created a system that throws rocks and other objects down a hole into a room, and I was making a thing that does the damage, and I thought, "It's too easy to just have a set damage for each object", so I started making my damage multiplying judging by the object's mass, material, and downward velocity.

That worked, but not the best, because they still do damage even once they hit the ground, and even though I could make the damage just do it to any part it touches, and only does damage once, this brings up the issue of if they hit each other, they stop doing damage, and also if they hit the part spawning them in, then don't do damage.

I'd rather not use any of the ways I've found so far because they practically all use humanoids, and I happen to be spawning in about 100-250 mesh parts each and every time this gets activated, so that would shred any frame rate on most devices.

So, in short: Is there a way to easily detect if a part is falling?

1 answer

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

I know you dislike the humanoid using method but.. just consider this; What if you add a humanoid, A humanoid has some really good built-in features Example: -Its Current State -Changing It's State

When a humanoid falls, its state changes to "free-falling", In theory if you added a humanoid into your object, (as a model)

You could possibly detect if the object is flying or not. (in air or not)

0
the issue with humanoids is the fact that they cause extreme lag in large quantities, and I'd rather not light most low end devices on fire. gwenniekins 59 — 3y
Ad

Answer this question