Interlinking constraints between a player's tool and a object in workspace

What am I trying to achieve?
I’m trying to achieve allowing the player to move freely whilst its connected between an object in the workspace and the player’s tool.

What have I tried?
I’ve tried to use RodConstraints but it makes you keep at a fixed length whilst its connected: https://gyazo.com/9a448899d087757d589459ba348bd901
I tired to anchor it but it still keeps at a fixed distance.

So, you want the connection to be purely visual?

Yes

I would test with using beams?

1 Like

I’ll have a go

I’d rather have a cylindrical visualisation if that makes sense? The first option I done was what I was looking for

@kingdom5
This was successfully done in Ultimate Driving, except it isn’t a cylinder but its basically what I’m looking for:

I see what you mean. This is just a part.

local part1, part2 = workspace.Part1, workspace.Part2

local part3 = Instance.new("Part")
part3.CanCollide = false
part3.Anchored = true
part3.Parent = workspace

while true do
	
	-- get length of part
	local length = (part2.Position - part1.Position).Magnitude
	part3.Size = Vector3.new(1,1, length)
	
	-- create a Cframe looking at the second part
	local lookAtPartCF = CFrame.new(part1.Position, part2.Position)
	-- add half the lenght to the look vector 
        -- part3.CFrame = lookAtPartCF + (lookAtPartCF.LookVector * (length * 0.5))
	part3.CFrame = lookAtPartCF + (lookAtPartCF.LookVector * (length / 2))
	wait()
end

7 Likes

It’d probably be better to use runService.Heartbeat:Wait() for an extra smooth consistency :ok_hand:

1 Like

Much appreciated

Yep lol you can see the lag when I move it.

There’s a bit of delay as you said yes @kingdom5 even after adding the RunService wait image

This probably is down to using a script instead of a local script. What setup are you using for this to run?

1 Like