How to make a gun shoot without it being on a tool?

Hello! Ok, so I am making a side-project that is a comedic bootleg RooM 2.
And since the weapon(s) are connected to the camera at all times, I don’t know how to make it shoot. I did want to try making it myself, but idk how to get the player mouse, I tried to look it up on google and the Dev Forum but didn’t get what I was looking for.

What the weapon attached to the camera looks like:

Can anyone help me? Thanks!

Maybe welding? Idk. I have never thought of that before.

I would look into using ContextActionService to handle the input. The benefit of this service is it easily allows you to have your game support multiple platforms compared to UserInputService.

To “shoot” your gun you can use raycasting which will have a similar effect as Mouse.Hit but won’t require the mouse object to be used.

1 Like

You can get a players mouse by doing
game.Players.LocalPlayer:GetMouse()
from a localscript
I think this is deprecated though