Hello.
I want to make a my gun use velocity to move a bullet from the handle to my mouse position. i will be passing the mouse pos trough an remoteevent. how would i make the script fire the bullet with a code that looks like this:
I would suggest a local script that handles the bullet visuals since if you are gonna get a lot of people shooting bullets it can affect the server side and make the game very laggy.
But wouldn’t you want to use BodyForce instead to make the bullet go where you clicked?
You can use RaycastParams instead, so like the bullet would start from inside the gun and then end up where the player’s mouse is clicking on. And once you set the RaycastResults, and you check to see if what the player actually shot is another character then you would could them receive damage.