Where should I start to make a throwable knife?

Hello! I’m fairly new to scripting and my goal is to make a knife that you can stab and throw (like mm2 or assassin). Where should I start? I’ve heard people say things like raycasting and tweening to the end of the ray, but I’m not too sure how that works. I don’t need full scripts or anything, I just want to know where to begin. What’s the most efficient way to make a knife both stab and throw?

1 Like

First of all,
Hitboxes

For hitboxes you need to NEVER use Touched.
Touched sucks and it should be inside the garbage can

There is alot of methods better than Touched. and works smoother

Touched sometimes fire when it doesnt even touch a part.

For other hitboxes example: Region3, raycast, magnitude

For stabbing hitboxes you can use either magnirude or region3

For projectile you can use raycasting

You should detect hitboxes on the client and do the checks on the server

Dont go like "OH CLIENT SUCKS EXPLOTAR EXPLOTAR MANAGE MANEG INSTA KILL GOD MODE KILL ALL"

No, you detect hitboxes on the client and do magnitude checks on the server

That way the physics act smoother and exploiters will go bye bye

For the velocity its not recommended to use tweening. I recommend you to use bodymovers or body velocities as they are more physics based and doesnt act janky.

Also for stabbing and throwing debounces you should manage it on the server unless you want some 9999 knife per second exploits inside your game

4 Likes

Thanks for the tips! Tomorrow I’ll experiment with some of the things you said. I appreciate the help!

1 Like