I'm trying to connect a rope between players by their heads but it's not working. It works if I replace the head index numbers with just 0, but then it puts the rope on the ground between their feet at the player position. If I do that and change the offset vector.y axis to 64 it kind of works but its just putting it at the player view up angle, so looking down would make it 64 units in front of you.
Does anyone know if there is a way to do this properly?
local head1 = pla1:LookupBone( "ValveBiped.Bip01_Head1" )
local head2 = pla2:LookupBone( "ValveBiped.Bip01_Head1" )
local rope = constraint.Rope( pla1, pla2, head1 , head2, Vector(0,0,0), Vector(0,0,0), pla1:GetPos():Distance(pla2:GetPos()), 0, 0, 6, "cable/rope", true )
[ERROR] addons/leafropes/lua/autorun/leafropes.lua:31: attempt to index upvalue 'rope' (a boolean value)
1. fn - addons/leafropes/lua/autorun/leafropes.lua:31
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109
i dont really recommend attaching ropes to player bones because of the highly unstable phys models going around the workshop lately (ported models usually) gmod doesnt like that and crashes the server most likely when a broken ragdoll gets "roped" you can try it with the light tool if you know any broken models
Sorry, you need to Log In to post a reply to this thread.