Bullet.CFrame = CFrame.new(Bullet.Position, mouse) * CFrame.Angles(0, math.rad(90), 0)
if its facing sideways, this should rotate it 90 degrees.
Bullet.CFrame = CFrame.new(Bullet.Position, mouse) * CFrame.Angles(0, math.rad(90), 0)
if its facing sideways, this should rotate it 90 degrees.
My problem is not that it faces sideways the whole time, it only faces sideways when I shoot to the side which is a problem.
Here’s a link to the game, Because its hard to explain:
https://www.roblox.com/games/6927193723/Gun-system
I think you would need to show more of the script because it seems correct.
In order to make your bullet face a certain point in space, you are correct in saying:
Bullet.CFrame = CFrame.new(Bullet.Position, mouse.Hit.p)
This will orient the bullet’s front face to point towards your mouse’s position in 3D space.
I believe others have already said this, though, so the problem is likely in some code that you haven’t shown here.
always post the relevant code, it really helps get the problem solved with as little confusion as possible
This is my local script to fire the remote:
--code was here
That code is functional so far as I know. What about the local code used for detecting user input and generating the projectile?
That is done on the server side.
I think i fixed the problem, I was mixing up “Bullet” and “projectile”, the projectile is the variable for the cloned Bullet. It works now.
Thanks for everyone’s help,