Are all Events Delayed?

Where are you updating the part’s position though?

part.Velocity = mousepos * 100


This is for things you know where the projectile will go next (using cframe). Not for things the physcis engine does and you have no control over.

The first sentence from your original post stated that that you were seeing an issue where the event did not fire 100% of the time - meaning that it sometimes failed to fire.

A delay of 4-5 seconds seems unexpectedly long for replication delay. However, since you stated that the issue seems to go away when running the touched event on the client, it seems likely that you are seeing replication delay.

I’ve tried that as well which resulted in another fail.

Setting the cframe of a part isn’t supposed to fail though were you anchoring the part.

when I said ‘it doesn’t always run 100% every time’ what I meant by that was that it doesn’t always fire at the time it’s supposed to be fired.

Yes, I anchor the part when it’s detected. I also position it where the ray hit.

Could you share how your doing that then? CFrame would never fail it’s a roblox built in thing.

CFrame isn’t what’s failing here. I can send a piece of the actual code, as the one i sent earlier is just an example of how I did it. It’s one in the same, but maybe I forgot something?

You weren’t updating the position manually though you were using velocity which you have no control over.

So you’d suggest just CFraming a part in a direction instead of using a smooth transition with bodyvelocity or velocity?

Yah, you don’t actually know when velocity updates the raycast should be made when the part’s position updates to the new position.

Also you can do a smooth transition with CFrame to. Using Hearbeat:Wait()and the deltatime reiceved.

That’s a fair point I’d say. So how about the smooth transition for CFrame? I know you can use tweenservice to transition a value/property, but aren’t services not meant to be spammed with?

local ElapsedTime = 0

ElapsedTime += v
Part.Position = Vector3Direction * ElapsedTime

– do raycasting

Yah don’t use tweenservice.

Isn’t runservice also a service though, using that may add on to game performance since everyone would be spamming cannons, or projectiles.

You only need one hearbeat connection and lopp through the array of projectiles, store each projectile you make in an array.

Also services don’t cause lag that doesn’t really make sense?

If you use them too much they can time out, or something relative to that. I know you can’t use some services all the time.

No… That’s for datastore service. And HttpService.

There’s a lot more services too that can’t be spammed with. Services in general do cost performance to use from what I’ve heard.