I'm basically trying to make a fireball launcher, that will make a fireball mesh move to a CFrame that takes the direction a player is looking in, and sends it 100 studs forward from there. Currently, this seems to partially work. However there are 2 problems I see with this.
Here's the situation in technical terms:
So for this, I'm using a RemoteEvent to get which direction a player is looking in (I don't wanna use LookVector, because I don't know where it is located nor has it worked on the Y axis in the past, but if this is the way to go, please say so). The CFrame that the fireball is travellling to currently is:
player.Character.Head.CFrame * CFrame.new(0, 0, -100)
This is on the client side (on the part where they fire the server through the RemoteEvent), and through this the server just sends the fireball to the cframe. This is kinda dangerous, because then the client has full control over this fireball. I guess I could filter this thought, by using :DistanceFromCharacter(the cframe) on the server side.
With this game, I have an unrelated script that makes the players' heads move (only on the client side) according to the player's camera's position. Since the CFrame the fireball is travelling to completely relies on the client side, things get weird whenever the player has animations playing that make their head move from side to side (the CFrame is directed at where the head is facing, not the camera). Also, with my custom head turning script, the head rotates upward a little when looking completely right or left, which sends the fireball into the air instead of going straight like the problem is. I need this fixed.
In short, the fireball has 2 problems:
- Where it is travelling to is completely client-sided (I guess a filter would work?)
- The direction the fireball is travelling in relies on the player's head instead of a more desirable direction: the player's camera's look direction (I don't know how I would find/use this).
Thanks for reading! I know it's a lot.

4 comments
to get the camera direction you just do
Camera.CFrame.LookVector. clientsided traveling is typically used for FPS games, just have sanity checks to make sure that they're not doing some wacky stuffI would personally used LookVector
Use lookvector and you can control its speed by multiplying the Lookvector by a number
maybe use remote events