What do you want to achieve? Keep it simple and clear!
I’m working on a fishing pole. I’m already made a simple model and have a rope attached to the bobber. What I want to do is launch the bobber towards the mouse on mouse click. The bobber is going to arc in the air and eventually fall. It will bounce off parts that aren’t water. The bobber is going to be restrained by the rope, so it can’t just go anywhere. I want other players to be able to see the bobber getting launched.
What is the issue? Include enough details if possible!
The problem is, I don’t even know where to start to launch the bobber. I’m not very well versed with the roblox physics engine and how to use it in games.
What solutions have you thought of so far?
Searching this up, I found two things that might be the solution, Velocity and BodyVelocity. However, Velocity is stated to be depreciated on the Roblox developer library and I’m not certain if BodyVelocity is even what I need. The descriptions for BodyVelocity and the similar things such as BodyThrust are confusing and I frankly can’t get my head around it.
I assume I would need to do this via a regular script, as a local script won’t replicate to other players.
Assistance would be gladly appreciated. I’m currently messing around with BodyVelocity, but it’s very confusing and it’s like working in the dark.
I would look into BodyVelocity, and BodyForce. You said that Velocity is depricated, it in fact is but that’s for parts. If you Instance BodyVelocity, it’s not depricated. For a part you’d want to use Linear/Angular Velocity. Anyways. Set a constraint to the bobber, detect when the player clicks, get the look vector of where the person clicks. Set the velocity relative to the look vector. Imply a BodyForce that has a downward force, OR you can Destroy the bodyvelocity after a certain amount of seconds. I am doing this off the top of my head, so I won’t know if it works or not. Hopefully I helped.
You can also try out BodyForce & RocketPropulsion. Maybe when the bobber is launched you apply a force up in the air and after some time change the bodyforce back to 0. Then you add a rocketpropulsion or bodyposition and set it’s target to the mouse position. (The target has to be a instance if you choose a rocketpropulsion, so create a non-visible part where the mouse position is.)
You will need to use a local script to get the mouse position and use a remote event & script so other players see.