Bullet not spawning in correct position

Hiya, my bullet isn’t spawning in the proper direction, can someone explain why this is and a possible solution?

Example:

Code:

local MaxAmmo = 8
local CurrentAmmo = 8
local Debounce = false

script.Parent.Parent.Activated:Connect(function()
	if Debounce == true then
	else
		Debounce = true
		script.Parent.Parent.Shoot:Play()
		local Bullet = game.ReplicatedStorage.Objects.Bullet:Clone()
		Bullet.Parent = workspace
		Bullet.CFrame = script.Parent.Parent.Handle.BulletSpawnA.CFrame
		wait(0.2)
		Bullet.Anchored = false
		local BV = Instance.new("BodyVelocity",Bullet)
		BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
		BV.Velocity = script.Parent.Parent.Handle.BulletSpawnA.CFrame.LookVector * 20
		wait(0.25)
		Debounce = false
	end	
end)

if the torso rotation is client sided and the bullet spawn is server sided it will not spawn in the right position, u can also try using
bullet.CFrame = CFrame.new(origin.Position, mouse.Hit.p)
to make it fave towards where u clicked

i forgot to mention why it doesn’t spawn in the right position if the torso rotation is client sided and bullet spawn server sided, but basically its bc the torso isnt rotated like that for the server and will get the server position which is a different position

1 Like

Oh, makes more sense, ill try this and get back to you.

1 Like