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

How to stop projectiles without delay?

I have a script which shoots a projectile towards the mouse position alongside a player animation. What i want is for the projectile to stop (anchor) when it hits something. At first i added velocity to the projectile to move it and the movement was pretty smooth. But there seems to be a big delay in movement across the client that created it and the other clients/server. When i anchor the part from either the clients local script or if i put a normal script inside the projectile, it anchors at different locations. In the client that created it its usually on the ground or deep in the ground because late detection. On other clients its usually in the air. So i tried moving the projectile by adding a script into it and using Heartbeat to move it with cframe. The anchoring works and its in sync across clients but the movement is extremely jaggy because of the speed it needs to have. Basically, im stuck and have no idea how to make a projectile that can do this. Any ideas?

3 comments

0

That doesn' really help me. I don't even have filtering enabled.

0

How about using a "RocketPropulsion" for the required velocity and fire the ReachedTarget() RblxSignal when it reaches the point or target?

1 answer

You can log what the projectile's cframe is when it "stops" then bring it back to that cframe when you anchor it. Just a thought, idk if thats what you are looking for.

1 comment

0

That would work but 2 problems: 1. The touched event seems to have a delay when the part has been newly created. If i shoot the projectile somewhere close it'll only detect touched when its deep inside. If i send it a long distance it actually works. 2. On other clients it'll be in midair and suddenly teleport to the ground.

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