What is the best way to "swing" the player?

I’m making a spider man type web swing thing. I want to know the best way to say “swing” the player with a rope. I have everything set up with the web/rope that is attached to the player. At the moment I’m using a “Body Force” but its not cutting it for me. If you have any suggestions please let me know. I’m looking for a smoother way. Thanks.

Code:

		local Force = Instance.new('BodyForce',character.PrimaryPart)
		Force.Force = camera.CFrame.lookVector * Vector3.new(7000, 5000, 7000)
2 Likes

if you want a swing you need to go from a plus to a minus value on either the X or Z direction.
For smoothness maybe use Tween Service as in

1 Like

Hello!
I’ve tried my hand at web swinging and Im proud to say that I have made a system I’m comfortable with.

I’ve never made a post thoroughly explaining anything, but I’ll try my best to explain the force in steps to help you follow along :blush:

1 - Since you are currently using BodyForce, I would recommend just fine tuning the force until you’re happy with the result (meaning switching the number of the force applied).

2 - Also, from my experience, Id put the force on the y axis to zero, that way if the play happens to look down, they dont come crashing down and end up as a Spidey pancake😅.

3 - Id try to figure out a way to find a point on a building for the web to attach to on its own (use raycasts) hint hint lol.

I may not have been very clear, but I tried my best. Please don’t hesitate to tell me if you run into any troubles, I’m always here to help! :smiley:

From one dev to another,
staramlord

2 Likes

With it attaching to buildings is where I hit rock bottom lol, I cant seem to figure out how to do that other then raycasts that still doesn’t work like I want it to lol, but thanks for the suggestions.

1 Like