I am creating a gun script and wanted to use lerp to move the bullet down range. The problem with this is: Lerp is based on time not speed. This has undesirable affects on bullets. What I mean is: If you shoot at an object that is 1000 studs away the bullet will travel extremely fast to it's target. If you shoot at an object that is 5 studs away the bullet moves slowly to it's target.

I am not interested in using roblox bodymovers as they have undesirable affects on the game itself. ie, Lag.

RayCasting: I've used it, it's great but not realistic. RayCasting will instantly hit a target, unlike a bullet that moves down range before colliding with it's target.

4 comments

0

This equation is useful for scaling things: value_to_scale / original_amount * current_amount, for example, this scales a health bar based on the amount of health a player has: bar.Size = UDim2.new(1/human.MaxHealth*human.Health,0,1,0) (please note that this may not be useful with lerp, but would probably work when working with making a movement speed of something like a bodymover consistent based

0

@TheDeadlyPanther Thanks I will take this into consideration.

5

Downvoted.

0

Bullet movement with body movers is easy enough but again, it causes lag. Ray trace is fairly simple my only problem with it is the fact that it is unrealistic.