Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i fix the bullet's direction?

I'm making a fps game and all i get is a bullet facing the wrong direction here is some footage

Photo

and here is the code

Mouse.Button1Down:Connect(function()
local BulletRay = Ray.new(Weapon.Shoot.CFrame.p,Weapon.Shoot.CFrame.LookVector * 500)
local Part,Position,Normal = workspace:FindPartOnRayWithIgnoreList(BulletRay,{Character,Weapon})
local Distance = (Weapon.Shoot.CFrame.p-Position).magnitude
local Bullet = Instance.new("Part",workspace.World.DebrisItems)
Bullet.Anchored,Bullet.CanCollide = true,false
Bullet.BrickColor = BrickColor.new("Institutional white")
Bullet.Material = Enum.Material.Neon
Bullet.Transparency = .3
Bullet.Size = Vector3.new(.3,.3,Distance)
Bullet.CFrame = CFrame.new(Weapon.Shoot.CFrame.p,Position) *         CFrame.new(0,0,-Distance/2)
game.Debris:AddItem(Bullet,10)
end)

is there any way i can fix it?

3 comments

0

This isn't really a fix but i know the problem i think the LookVector only faces foward of you and ignores rotation but thats all i know im not really sure how to fix it

0

Yeah but its the weapons shootpart not my head

0

I would keep experimenting till it appears straight shouldn't be that hard

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.