How on earth does ERLC handle seats & handcuffs so well?

I’ve been trying to make/obtain a basic handcuff system, and I’m stuck on one problem with mine that I just can’t surmount.
I currently have a base that I really like, and perfectly handles dragging & frisking. However, there’s one problem consistent with most handcuff systems; They start to break when you take seats into account.
Anyone being dragged gets carried along even if the person dragging them enters a seat/drives a vehicleseat, and cuffing someone who is already in a seat ends up moving the seat along with them via the weld that’s always created between seat and seat occupant. I really don’t want to have people magically dragging cars around by their passengers, and ERLC seems to have the only system that addresses this!
So, I pretty much have to ask this:
Are there any ways to address how specific seats work once someone is handcuffed?
I don’t know any other working examples of a fix besides ERLC’s, and could really use the help.

Many thanks!

5 Likes

If you moved to something involving a custom vehicle controller, not using the default seat instances, you could have a simple escape statement keeping someone from interacting with the vehicle if they’re currently handcuffed. If you must rely on default seats, they do have a disabled property, and you can kick the passenger of a seat if you detect they’re handcuffed

3 Likes

I see what you mean, but would have done that if seat ejection were my only concern. I used ERLC as the prime example of my goal because it both stops those who are cuffed from entering regular seats AND contains seats specifically for those in a cuffed state (allowing them to be moved/taken in and out of the seat without exhibiting the weld problems listed above).

3 Likes

To my knowledge you can still use the seat instances’ :Sit() method on a player even if the seat is disabled. Perhaps you could listen for a .Touched event on the seat itself (while it is disabled), check if they are the proper state of cuffed or uncuffed, and force them to sit accordingly?
*for sanity on that touched event I’d recommend creating CollisionGroups specifically for it to only collide with players

2 Likes

Thanks, that’s a great idea as far as whitelisting a seat’s usage for cuffed players goes.
But once sat, Can’t their player character still be physically moved with the cuffs’ drag function, repeating the vehicle movement problem described earlier?

2 Likes

if the dragging function is toggled by whoever cuffed the player, could you have them fire a remoteevent telling the server to kick the cuffed person from their seat when they start dragging?

2 Likes

Would work, but turns it into a problem with my cuff tool. Currently, a cuffed player can be dragged by anyone that has a cuff tool, and the system itself doesn’t track the button being pressed as an event separate from the one that it toggles (bring cuffed). Assuming I’m visualizing this correctly,
doing that would also eject cuffed people from seats the instant they enter them because I haven’t implemented tracking how long someone has been cuffed for.

Thinking about it further, I would also have to make it so that the instant a cuffed person is welded to a seat the cuff would stop anyone dragging them from doing so, which would require tracking what everyone is welded to in order to check (which I don’t know how to do).

2 Likes