Help with "Zipline" thing

Hey, Devforum.
Here’s the zipline-swing-combination-thingy that I can’t get to work.


Essentially, a player will stand on the bottom part (the one that’s not glowing). It moves fine, but it won’t bring the player along.

When I don’t write any code, the player falls off. Makes sense. I wrote the following code block for this:

local controls = require(game:GetService("Players").LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls()
local doing = false

script.Parent.Touched:Connect(function(part)
	if doing or part.Parent:FindFirstChild("Humanoid") == nil or not string.find(part.Name, "Leg") then
		return
	end
	
	doing = true
	
	script.Parent.Metal:Play()
	script.Parent.Anchored = false
	
	game.Players.LocalPlayer.PlayerGui.CinematicBars.Activate:Fire(18)
	controls:Disable()
	
	local w = Instance.new("WeldConstraint")
	w.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
	w.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
	w.Part1 = script.Parent
	
	task.wait(2)
	game:GetService("TweenService"):Create(script.Parent.Parent.Bar, TweenInfo.new(10, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {Position = Vector3.new(9796.516, 3072.07, -1688.325)}):Play()
	task.wait(10)
	
	w:Destroy()
	controls:Enable()
end)

Any mention of the variable “w” is in regards of a WeldConstraint connecting the character’s humanoid root part to the platform.

The character model, however, gets locked in the air when the weld is created, resulting in… this.


This is not supposed to happen.

Any help is greatly appreciated!

Try using a ball socket constraint

I should’ve probably mentioned this when I completed it: this problem is solved. It had to do with network ownership, essentially, so not at all related to physics.

Oh I see, great job man! Doing good work out there, keep going!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.