Hello, I have a projectile script that I’m trying to make go to where the player first clicked but I’m not sure how to do that, I tried sending mouse.X and mouse.Y to a script through a remote, but that didn’t work.
Do you have a local script that fires that Remote Event to the server when you detect the user input of your choice? You should be sending the target coordinates in that Remote Event as the parameter (e.g. mouse.Hit when the player clicks the left mouse button).
Is this a 1 player game? If you are setting the player.Name to a static global variable then that will be overwritten by any other player that shoots after that.
Are you sure you want to use a Body Velocity? If you send the mouse.Hit in the Remote Event and then use a Body Force you can send the bullet at the World Coordinates of the mouse.Hit CFrame.
Are you asking for help on how to deal the damage as well or are you able to figure that out once you know how to fire the “cannon”?
I have a local script that fires and sends mouse.Hit when button1 goes down, yes I know that it will be overwritten after another play shoots it. I can make it so that it deals damage, only thing I lack experience is, is in bodymovers.