What is a better way to script throwable objects?

RemoteFunctions
Basically with this, I’d InvokeClient and return the mouse position or ray. The problem with this is that it may delay in games with more than 1 player.

RemoteEvents
This way is good, but exploitable as players know how to exploit things that need to be thrown. I’d have to pass the mouse position, or ray through the function to server for it to work. The problem with this is that people can tamper with the position and make auto aim. How can I prevent this from happening?

2 Likes

What exactly are you trying to have thrown? Maybe this could help me understand your goal.

Something like a kunai would be an example.

I would recommend usage of RemoteEvents.

Humanoid.TargetPoint Is a good way to get the mouse position of where the player last clicked with a tool you can use GetPropertyChangedSignal to detect when this changes instead of using a loop.Humanoid | Documentation - Roblox Creator Hub there might be a better way if anyone knows a better way please tell me

I recommend looking at EgoMoose’s tutorial for a better explanation of how to model and create projectiles. For the issue with exploitation, you can take a look at popular FPS models, including this recent tutorial and utilize the network methods explained there. Also, I recommend taking a look at this article by Autterfly on exploitation.