Hello! For my 2D game, one of the weapons is the classic rocket launcher. The problem is that most guns are designed to fire where the mouse is. Because it’s 2D, it hits the invisible walls designed to keep everything together, killing the player
How could I make it to only shoot in direction the weapon is facing, instead of the mouse’s placement, like an actual gun in real life?
I used the Rocket Launcher from Roblox
No, you gotta iintercept the mouse read in your guns and strip either the X or Z Values, depending on which way you sideways your world (Set it equal to the player’s or the mid-line of your world)
local X = Midline
local Pos = MouseLoc:InvokeClient(MyPlayer)
Pos = Vector3.New(X, Pos.y Pos.z)
Yo better strip it from the rocket’s origin as well or it could still go off at an angle.