Any way to clear a SetParentAttachment...?

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
I put some SetParent input on a player, and then a SetParentAttachment. It worked fine, but when the ClearParent input on the player, it only clears the SetParent, but not the SetParentAttachment, resulting in the player being stuck in mid air. The only escape is to respawn or use noclip, which I can't allow. Is there any workaround for this? Already tried to SetParent another entity, didn't work as the Attachment transferred over, I also try a blank Attachment but it didn't work either.

This is very important if I want this map gimmick I'm making to work at all.
 

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
Sure it might say that, but then it's not parented to anything? Or does it remain attached to what it was before?

Even though its not parented, its still parented to the attachment, therefore the player is stuck and cannot move. It's also still parented to the same attachment point
 

TheMightyGerbil

L2: Junior Member
Dec 23, 2012
79
21
Unfortunately I had the same problem and couldn't find a solution either https://tf2maps.net/threads/can-you-clear-setparentattachment.35188/#post-434320 .

The best I could figure out was to kill that player and use a trigger_player_respawn_override to respawn them instantly at a specific location. Since I'm using it for a vehicle it's tolerable, as there is supposed to be a change in view as you get out of it, but having your corpse fly out of the vehicle at the same time is annoying to say the least.

If you find a way let me know :) .

EDIT: I saw this thread before I saw you posted on my profile XD.
 
Last edited:

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
As an alternative to parenting, there is logic_measure_movement. However I don't know if it's suitable for your usage (specifically on players).

Does not allow/change attachment parenting therefore it won't work