I’m currently trying to make something very simple.
I want a gun to shoot a projectile where its looking.
The issue is that the projectile isn’t going the way I want it to shoot.
I first used BodyVelocity for this, but then thought that maybe CFrame would be better.
This is what happens
Here is the script I have in the gun:
script.FireGun.OnServerEvent:Connect(function() --Create bullet local bullet = script.Parent.Muzzle.Bullet:Clone() bullet.Parent = workspace bullet.Transparency = 0.1 bullet.Trail.Enabled = true bullet.Anchored = true --Make bullet go forward bullet.Move.Value = true end)
This is the script I have inside the bullet:
while wait() do if script.Parent.Move.Value == true then script.Parent.CFrame = CFrame.new(script.Parent.Position - Vector3.new(0,0,1)) end end
I hope I can find a solution for this!