so this is a continuation to my previous .Touched post. turns out the event itself works fine, but for some reason the bombs position on the client is different than on the server.
here is my script:
Honestly this seems more and more like one of those weird limitations with the physics engine in regards to replication. Are you using :ApplyImpulse() as your method for adding velocity?
Okay, so a funny caveat with using ApplyImpulse is that only the physics owner can use that function. Because of this if you do decide to keep it as networkowned by the player, it needs to have it’s force applied by the client.
Also from prior experience, using ApplyImpulse on server operated physics objects can result in very inconsistent motion.
Edit: Either try manually setting the physics to the server to use applyimpulse, or you can try it on the client which will return smoother results(potentially better overall), but can be exploitable.
The issue with levitation is likely due to touched being fired early. Perhaps try a different collision detection method? When it comes to relying on Touched for critical game functionality, I’d advise against it for a number of factors.
Two possible ways I can suggest is manually moving thrown objects through stepped raycasts, or alternatively try to pick up touched objects using spatial queries.
Edit: Alternatively you could try and fire a raycast of some sort after touched is fired to find a surface to attach to.
nevermind it works fine. the bombs are flying smooth and the touched event works just fine (maybe a lil bit laggy). i simply forgot to remove this old line of code