So I’ve recently been working on an fps shooter and have just got the bullets working on a server side. i want to make them fire from the gun as a projectile and have followed a few tutorials as well as look on the forum to help with this.
This issue that I am experiencing, is that the Bullets do not shoot out towards the direction of the mouse direction. Instead they are instanced and then full to the floor. I’ve tried to fiddle with my script and look for other forums relevent, but I can’t find anything simillar to my issue.
Here is my code currently. I’m not sure if it is to do with the data sent from the remote event but it doesn’t seem to be:
remoteEvent.OnServerEvent:Connect(function(player, gunPos, gunOr, mosPos)
findBullet()
local speed = Module.Speed
Bullet.CFrame = CFrame.new(gunPos, mosPos)
Bullet.AssemblyLinearVelocity = ranCone(Bullet.CFrame.LookVector, Spread) * speed
game:GetService("Debris"):AddItem(Bullet, 4)
end)
Here is the remote event being fired just encase:
remoteEvent:FireServer(gun.Barrel.Position, gun.Barrel.Orientation, mouse.Hit.Position)
And if you are confused on what I mean by it just fulls, here is a gif of what I mean: