Create rope between two entitys

Okay, I wanna make a rope between me and what I’m looking at.

My guess was:

for k, v in pairs( player.GetAll() ) do
	ply = v
	ent = ply:GetEyeTrace().Entity
	constraint.Rope( ply, entity, 0, 0, ply:GetLocalPos(), ent:GetLocalPos(), 10, 5, 10, 5, "Cable/cable2", 1 )

But I was wrong. If any of you have an idea, please help. :slight_smile:

  • snip not funny -

Try Vector(0, 0, 0) instead of x:GetLocalPos()

Didn’t work :’(

  local ent = ply:GetEyeTrace().Entity

Spawned a barrel, looked at the barrel and entered the cmd and it works. :smile: