I cant seem to fix this bug

Bug:
While moving it off centers the shot.

It is based off of look vector to prevent silent aim exploits.

Does the same thing forward and backward and side to side.

Script:

local function MakeBullet(Player,Character, Weapon)
	local Gun = Character[Player.Stats.Gun.Value]
	local Bullet = game.ServerStorage.Objects.Bullet:Clone()
	Bullet.Parent = game.Workspace.Projectiles
	Bullet.CFrame = Gun.End.CFrame
	--MoveBullet(Character, Bullet, Weapon,Gun)
	game.Debris:AddItem(Bullet, Weapon.BulletTimeout)
end

Any tips?

1 Like

Could you show a gif variant? I sort of dont understand what do you mean by that picture…

1 Like

Sure thing,

1 Like

You cant really fix that. It gets the position of the gun, and then it fires the bullet. the reason of that is that it takes some time to get the position and then set it for bullet and then velocity.
Dont worry, it’s okay to have that problem.
https://gyazo.com/1c93be1385ccbcf7207ffc3aa57e1974 my gif variant of me having the same thing in my gun game

1 Like

Ok, it feels nice that im not the only one, lol.

2 Likes

It’s a bit much though. Pre-make your bullets and just adjust the CFrame & whatever else must change.

2 Likes

if you use cframe to make the bullet fly, it will make it really easy

for i=1, 100 do
     bullet.CFrame = Gun.End.CFrame * CFrame.new(0, 0, -i)
     game:GetService("RunService").Heartbeat:Wait()
end

i dont recommend doing this though since it will look really weird
you should just keep doing what your doing but make the bullet faster

1 Like

looks cool!!

showing the bullet locally for each person in the game will fix the delay.

you can figure out where the bullet hits on the server using raycasting.

lmk if you eed help with any of that.

2 Likes