Projectile moving funky

Made a projectile thing using a tween:

local Tween = TS:Create(HookProjectile,TweenInfo.new(3),{CFrame = HookProjectile.CFrame * CFrame.new(0,0,-130)})
Tween:Play()

And when it fires the projectile sometimes shoots straight but most other times it like while its moving forward it is also clipping up and down. btw it is a server script.

1 Like

If you’re gonna have lots of projectiles Tweens are a bad idea because they take a lot of memory when sending the information of the position from server to player, not too troublesome when it’s a few but they stack up

So CFrames or something? If that wont work I dont really know many other options.

I think VectorForces are the most common way to make a projectile, i’m assuming you destroy the projectile after the tween is over, with VectorForces instead use Debris to destroy them after their desired lifespan is over

Documentation on VectorForces:VectorForce | Documentation - Roblox Creator Hub

1 Like

Okay cool, I think I was already using debris anyway.

I dont think this vector force thing is gonna work. Its just acting weird, and I also made the projectile get deleted when it touches certain parts (like the floor) and it just get deleted before that, and if it does not it gets flung in some random direction. That and I need it to shoot towards my cursor.

Make the force push it towards it’s look vector and then spawn the projectile at the barrel of the weapon and make it point towards the mouse

Well, it spawns in the player but that will not effect it since I made sure to not delete if it touches anything that is a descendant of the character, but when I first tried it kinda just fell (cus gravity ig)

I am having trouble with the vector force thing. I have never used them before. It does not aim at my mouse. Also I when I try to make it equal to my look vector it just does not work, probably because my model it very weird.