So you don’t want the player to start moving up?
No, I want the player to keep his distance from the wall and not be pulled under the aiming part to which the rope is attached
Can you show us the line that sets the RopeConstraint’s winch properties?
Sorry, I probably didn’t describe my problem well enough, this is my first post here. The problem is not the length of the rope or the fact that the rope is reduced to these sizes.
Here’s a picture that might be more descriptive of the problem:
So you don’t want the player to swing towards the wall?
Yes, I want the player to fly on the web straight
Are you using any body movers to prevent the player from go towards the wall?
I tried to use raycast, and HRP cframe, and something else, but I deleted this script
Well, if your just letting the player to free fall while hanging on the rope constraint, then it’s gonna go towards the wall cause there’s no body mover counter attacking the physics
Do you mean BodyPosition?
I just don’t quite understand how to use this for body mover counter attacking the physics
Like a BodyVelocity or BodyForce
If you’re gonna use BodyForce, you can set the force to the camera’s look vector and multiply it by something like this Vector3.new(2500, 1000, 2500)
Force = camera.CFrame.LookVector * Vector3.new(2500, 1000, 2500)
Or if you’re planning to use a BodyVelocity, you can set it’s properties to this
MaxForce = Vector3.new(4000, 20, 4000)
And set it’s velocity to:
Velocity = camera.CFrame.LookVector * 180 -- 180 is the speed
I tried, maybe I’m doing something wrong, or this is how it should work, the player is further drawn to the wall
bodyVelocity = camera.CFrame.LookVector * 180
bodyVelocity.MaxForce = Vector3.new(4000, 20, 4000)
It should be put in a loop, mind showing how your code is setup?
I put it inside the function that determines which side of the aimPart, it’s in the right hand, but I put the same thing in the left
if aimPartX > playerX then
CleanupConnections(LeftConnections)
local Connection = LerpOffset(
CFrame.Angles(0, 0, math.rad(TiltAngle)),
true
)
table.insert(LeftConnections, Connection)
stopswingleftanims()
web.Enabled = true
web.FaceCamera = true
ropePart:WaitForChild("Beam").Attachment0 = attachment2
ropePart.Parent = RH
selectedValue.Changed:Connect(function(value)
ropePart.CFrame = value.CFrame
end)
local SwingAnimsRH = SwingAnimsR[math.random(1, #SwingAnimsR)]
SwingAnimsRH:Play()
bodyVelocity = camera.CFrame.LookVector * 180
bodyVelocity.MaxForce = Vector3.new(4000, 20, 4000)
end
bodyVelocity.Velocity = camera.CFrame.LookVector * 180
Okay, thanks for the help, I’ll probably try to find a way out of this situation myself
Hello! I want to express my gratitude for the help. The first time I asked for help, it was difficult for me to understand the topic, and I did not understand it very well. Now I feel that my level of understanding has improved, I have reworked the material, and everything has worked out! Thank you!
Glad that it helped! Feel free to ask if you have more questions
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.