It is more of a quick question - I want my script to read when the ragdoll will happen. This being said it gets the apex of the moments after being on the air and compares it with a threshold.
To make a ragdoll, I need the server to make the limbs flailing and the client to change the HumanoidState.
How should I handle it?
Should:
a) The server be the only one to read it and send a remote to the client to change the state;
b) Both the client and the server read at the same time and execute their functions accordingly;
c) The client be the one to decide it all.
If you have other options, please let me know as well!
Well, since you’re doing things that need to be done on server and client, then go with handling everything on server and firing the event whenever the thing happens so that the client can change their humanoid state. Server will change constraints and whatever else you’re doing (dealing damage)
I would rather give the server NetworkOwnership to be honest. At the moment, I have been mostly trying to replace the characters, which looks bumpy in practice, especially in a situation in which the character is moving. Are you aware as to how I could change the network ownership of the entire character? The function :SetNetworkOwner() applies to base parts, thus my confusion.
I just tried out changing the ownership to the server through a function that iterates through all descendants. Upon changing, there is a slight lag, the player gets stuck mid-air for half a second.
Their HumanoidState should be Flying at that point, meaning they cant move but they have control. If they land with a low fall distance they should be able to walk fine.
I tried different combinations of what parts to set the ownership to the server as however the result is always the same - a bump.
If that’s the case I would just leave the client as the network owner so there isn’t a physics delay. Also assuming the player will regain control once they land.
On a last note, to change the humanoid’s state, I need to send a remote, correct? I have tried to change the state on the server with little success…