Help with ropes

I am making a swinging game however I am using ropes when the ropes connect it makes me stand in place and flip over

Can I get a video? It is hard to tell what exactly have setup when it comes to physic bases topics, without actually seeing it

1 Like

1 Like

Hey so I just made a simple script that will set a RopeConstraint between a part and my characters right hand. And for me it seemed to be as easy as that and it worked fine I didn’t flip over or get flung. All I did in the propertys was set WinchEnabled to true, and then all you gotta do is mess around with some of the Winch properties such as WinchForce

1 Like

But then again their are so many factors when it comes to physics, you could have something on your character, or something your character is standing on and that may be causing the issue. But for me in a empty new baseplate it worked fine

1 Like
local char = script.Parent.Parent
local Humanoid = char:FindFirstChild("Humanoid")
local hrp = char:FindFirstChild("HumanoidRootPart")

local r = Raycast()
if r == nil then return end


local hook = fx.GrappleHook:Clone()
hook.Parent = workspace.WorldFX
hook.Position = r.Position


local A1 =  Instance.new("Attachment")
A1.Parent =  char["Right Arm"]

local rope = Instance.new("RopeConstraint")
rope.Color = BrickColor.Gray()
rope.Parent = hook
rope.Visible = true
rope.Length =( char["Right Arm"].Position - r.Position).Magnitude 
rope.Attachment1  = hook.A0
rope.Attachment0 = A1
rope.WinchEnabled = true
rope.WinchForce = Vector3.new(1,1,1) * 9999999999999999999
rope.WinchSpeed = 10
rope.WinchTarget = 1
rope.Restitution = 0
1 Like

the winch force says 0 for some reason

Winch force isn’t a vector3. it is just a simple number value

1 Like

its still bugging but thanks for the vectorforce thing

Here is a video

2 Likes

its still not working roblox is goofy

local uis = game:GetService(“UserInputService”)
local repStore = game:GetService(“ReplicatedStorage”)
local tweenServ = game:GetService(“TweenService”)
local Debr = game:GetService(“Debris”)

local plr = game:GetService(“Players”).LocalPlayer
local mouse = plr:GetMouse()

local remote = repStore:WaitForChild(“Grapple”).Remotes.Grapple
local animation = repStore:WaitForChild(“Grapple”).Animation.Animation
local fx = repStore.Grapple.FX

local function Raycast()
local char = script.Parent.Parent

local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Blacklist
params.FilterDescendantsInstances = {char, workspace.WorldFX}

local mouseRay  = mouse.UnitRay
return workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 300, params)

end

local function Grapple(data)
local char = script.Parent.Parent
local Humanoid = char:FindFirstChild(“Humanoid”)
local hrp = char:FindFirstChild(“HumanoidRootPart”)

local r = Raycast()
if r == nil then return end


local hook = fx.GrappleHook:Clone()
hook.Parent = workspace.WorldFX
hook.Position = r.Position


local A1 =  Instance.new("Attachment")
A1.Parent =  char.RightHand

local rope = hook.RopeConstraint
rope.Length = ( hrp.Position - r.Position).Magnitude 
rope.Attachment0  = hook.A0
rope.Attachment1 = A1



game.Debris:AddItem(hook, 5)
game.Debris:AddItem(A1, 5)

local Connct 
Connct = game:GetService("RunService").Stepped:Connect(function(dt)
	if (hook.Position - hrp.Position).Magnitude > 3 then
		rope.WinchEnabled = false
	end
	
end)

end

uis.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode == Enum.KeyCode.E then
Grapple()

end

end)

1 Like

local uis = game:GetService(“UserInputService”)
local repStore = game:GetService(“ReplicatedStorage”)
local tweenServ = game:GetService(“TweenService”)
local Debr = game:GetService(“Debris”)

local plr = game:GetService(“Players”).LocalPlayer
local mouse = plr:GetMouse()

local remote = repStore:WaitForChild(“Grapple”).Remotes.Grapple
local animation = repStore:WaitForChild(“Grapple”).Animation.Animation
local fx = repStore.Grapple.FX

local function Raycast()
local char = script.Parent.Parent

local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Blacklist
params.FilterDescendantsInstances = {char, workspace.WorldFX}

local mouseRay  = mouse.UnitRay
return workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 300, params)

end

local function Grapple(data)
local char = script.Parent.Parent
local Humanoid = char:FindFirstChild(“Humanoid”)
local hrp = char:FindFirstChild(“HumanoidRootPart”)

local r = Raycast()
if r == nil then return end


local hook = fx.GrappleHook:Clone()
hook.Parent = workspace.WorldFX
hook.Position = r.Position


local A1 =  Instance.new("Attachment")
A1.Parent =  char.RightHand

local rope = hook.RopeConstraint
rope.Length = ( hrp.Position - r.Position).Magnitude 
rope.Attachment0  = hook.A0
rope.Attachment1 = A1



game.Debris:AddItem(hook, 5)
game.Debris:AddItem(A1, 5)

local Connct 
Connct = game:GetService("RunService").Stepped:Connect(function(dt)
	if (hook.Position - hrp.Position).Magnitude > 3 then
		rope.WinchEnabled = false
	end
	
end)

end