Making a entity with rope

Hello People!

My problem is that is there a way to make an entity automaticly roped with the air

You will ask why i know.Reason is i am trying to make the sandbag thing for box/fighter job on my darkrp server as entity and i need help

İf you guys know how to do it or if you guys know a way to do it please share with me.Thank you

                                                                                                                                                                 Kind Regards
                                                                                                                                                                      Just.

See how light tool does it: https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/light.lua#L101

Thank you i will try to take a look at it now