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

How would i make a distance based intensity for an explosion camera shake?

So i'm trying to make like an explosion camera shake and i'm trying to invert the magnitude between the explosion and nearby players but i don't know how to do it? I'm kind of confused is this the way to do it or?

math.floor(math.abs(math.abs((v.Character.Torso.Position - ExplosionPart.Position).Magnitude)*-1)/5)

3 comments

0

why would you need to invert the magnitude

0

To increase the intensiy of the explosion as you get closer

0

Camera shake*

1 answer

✓ Accepted answer

If your game is set to R6, this should work

1/((v.Character.Torso.Position - ExplosionPart.Position).Magnitude)

1 comment

0

Thank you man you really helped out!

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