Bullet moves more to the front then where its supposed to be at!

For some reason I can’t fix this problem where the guns bullet shoots far from
its original position.

Is there anyway to fix this?

		Bullet.Parent = workspace.Terrain
		Bullet.CFrame = Handle.SHOOTPART.CFrame
		for i = 0,75 do
			task.wait()
			Bullet.CFrame += Bullet.CFrame.LookVector * 5
		end
		Debris:AddItem(Bullet)

robloxapp-20231228-1817449.wmv (1.2 MB)

Could it be the boundingbox of the bullet?

isnt :GetBoundingBox() meant for models? the bullet is a meshpart

I thought the bullet had a weird sort of box around it, like when you select it the mesh looks fine but its in a huge box outline

I know what u mean, its not that.

Theres nothing wrong with the script as I just tested it, so It could be the gun model you are using or the Shootpart cframe

Its not the gun model and it def not the shootpart cframe. I tested it on more models, and even a part.

could you provide the model and the bullet mesh you used?

15790321048
15790329045

Page cannot be found or no longer exists

404 | Page not found

is that what it says? I may have fixed the link now. I also moved the shootframe to the back but I don’t feel comfortable with it looking like that and it has a big boundrybox.

Alright, I fixed it but it included added a task.wait() function

while task.wait(1) do
	spawn(function() 
		local Bullet = game.ServerStorage.MarineStuff.Bullet:Clone()
		Bullet.Parent = workspace.Terrain
		Bullet.CFrame = Handle.SHOOTPART.CFrame
		task.wait(.5)-- Added wait here, it seems that it went to the other line for anybody to see
		for i = 0,75 do
			task.wait()
			Bullet.CFrame += Bullet.CFrame.LookVector * 5
		end
		Debris:AddItem(Bullet)
	end)
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.