Alright so I tried to make a detain system, everything works fine expect that when you weld the player to another player it makes them go free-fall, I tried to do humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, false) on the server but the player is still free-falling. Here is video:
I would just have your script play another animation that overrides the default. Make sure the animation is set as an Action.
Welding a player to an anchored part is going to cause very undesirable behavior, interfering with the user’s replication to other players in the game.
You won’t see this in Solo testing. Try running Server with 2 players and make the screens side-by-side. Player2 won’t see Player1 moving around while welded, or if they do, it will be very jittered and not updated frequently.
You will likely have to use your own custom Humanoid or NPC to achieve what you are trying to do. (Or, much simpler, and I would recommend, using BodyPosition and BodyGyro inside of the HumanoidRootPart to achieve what you are trying to do with a weld)
(You replied to the wrong person btw) At first when I welded a character to another character it was extremely laggy, but then I found out the SetNetworkOwner() exists and by setting the NetworkOwner to the player detaining the character, it isn’t laggy anymore. The only thing that is annoying is that when you weld the character to another character it makes the player getting detained into free-falling mode and I can’t stop that for some reason, do you have any ideas on how to fix it?
Yeah I’ve got a very solid idea on how to fix it. It’s in my reply to your thread asking for help, you can see it a couple lines up
So there is no way to stop the player from free-falling while getting weld to another character expect using bodyGyro and bodyPosition?
@Sir_Highness already provided the solution of how to override the default animation of a humanoid.
You could also just remove the animation script from your humanoid, that would stop the free-fall animation.
The best practice here would be to use bodyposition & bodygyro. Welding humanoids is no bueno.
You could try changing it to a different state entirely.
Else, follow what @Sir_Highness said.
You could just disable the freefall state using SetStateEnabled
Make sure to re-enable it when they are released otherwise they will fall through the floor