I need some help scripting a throwable rock

Basically I’m trying to make a rock that’s in your inventory, then you can throw it and it like exits your inventory and gets thrown forward. The problem is I really don’t even know how to start cause I’m honestly terrible at scripting so if anyone could help it would be very appreciated.

4 Likes

You would have to play an animation for the character and then you would clone the handle (the rock) and tween it to where the player’s mouse is pointing using a local script to get the mouse

1 Like

Yeah I understood that much, but how do you make it actually throw?

You can create a projectile then apply a velocity to it to make it move.

Example local script for throwing only:

2 Likes

I’ve looked at that, but the only problem is there is an error on line 8 due to DB not being defined, what should I define that as, just true?