I want to make a projectile system just like how particles work, with an acceleration value and a speed value.
the speed will be editable value, and the acceleration will be something changeable but by default Vector3.New(0,GRAVITY,0)
the direction is just which way the projectile is facing
how can I calculate a parts position and orientation every 1/60 of a second like particles
I have this:
while task.wait(1/60) do
for _,v in Container:GetChildren() do
if v:IsA("BasePart") then
v.Position+=v.CFrame.LookVector*(v:GetAttribute("Force")+ (-math.clamp(v.Orientation.X,-90,0)/v.Gravity.Value ))
v.Orientation+=Vector3.new(-v.Gravity.Value/100,0,0)
if v.Orientation.X<=-80 then
end
end
end
end
but it does not work much the way I want it to, if I set force to 0 it still goes up because I am trash scripter. so how can I calculate it like particles?