Trouble with projectiles

Hello, I have been having an issue that I’ve put off for quite some time and thats my bullets, I have made a custom part cache module that works perfectly fine and does its small job… however I have looked through the code several times trying to figure out why the speed of the projectile is faster after its been put in and reset.

Whenever the projectile is added to the cache, it is CFramed very far away and not to be moved until used again but those values are reset so I was wondering if using LookVector to move an object keeps its “velocity” and whenever you call upon it again it goes crazy. If anyone has this issue and found an answer please let me know, I am so close to finishing this and this is the last hill I need to get over. If you need any examples of code let me know by replying otherwise, here is a video.

Projectile example | DevForum - YouTube

Yes, if you want a single speed, you would use LookVector.Unit. Basically what .Unit does is it is the look vector without the depth component, basically making it one. So if you want a specific velocity, you do:

local newLookVector = lookVector.Unit * 200 — change this number to whatever speed
1 Like

This is currently my code for moving the projectile, image

I’ve tried various different solutions but have no clue why it doubles the speed or triples

I have found a solution and thought I’d share with all of you, I needed to utilize delta time to ensure I was not skipping frames and I also had to disconnect the Heartbeat loop to make sure I was not running multiple loops on top of each other.

This is just my testing code for now

1 Like