Client Movement Not Updating When Re-parenting to Workspace

Sorry for the long title, not sure how else to describe this.

I’m sure the cause of this issue lies within networking, however I’m not sure what steps I could take to solve the issue. I’m parenting all characters (except localplayer’s) on the client to Nil (to effectively hide them from the player for a varying amount of time) - however, when I’m ready to reparent the characters to Workspace, the movement received from their client does not update until they make a new movement.

I.e, when initially reparented, the characters reappear where they were when sent to nil, but as soon as that player makes a movement, their character teleports to the proper current location on the LocalPlayer’s client.

Is there a solution to this? If not, is there a simple way I can hide all aspects of non-local player’s characters from the client? Including chat bubbles, collision, etc

Thanks!

1 Like

To hide non-local player’s characters from the client you can create a folder in ReplicatedStorage dedicated to storing characters. Then, on the client, parent other character models to this folder to hide them and back to the Workspace to make them visible again. You’d have to set up some additional logic for when characters respawn and when re-parenting to the workspace characters need a positional update from the server to appear in their actual location

1 Like

Thank you for the copy and paste of this answer, but I have already read it.

What is the additional logic? That’s my question.

1 Like

Have the server store positions of all characters every second - and a remotefunction allowing the client to request a player location or the server to broadcast that position to the client. Use that logic to make the client set the character to the most up to date position.

2 Likes

I was hoping there would be a more elegant solution, but I suppose this will work. Why Roblox, whyyy?! Thank you!

2 Likes

A major caveat of this solution is that physics don’t also update. If you’ve ever experienced the ability to push over/move around a player’s character due to network issues, that’s what happens.

Even if I position them to their current position (Which I am now doing), if they don’t make a movement [thereby updating the network for the character] they’re susceptible to this issue.

Are there any ways to force a one-time network update for a player’s character?

Why don’t u change part’s transparency’s instead?

Collision groups, chat bubbles, and invisible characters affecting physics objects become an issue for the client who should not see the characters.

It’s definitely optimal to simply reparent the characters. Is there really no way to force a client to update network info for another player’s character?

Ah, fair enough. I personally never heard of a way to do so. One thing u can try is, when reparenting the characters, fire a remote to the server that positions the character of all players in their same positions, no difference will appear but maybe, just maybe, Roblox will count that as movement from the player and run physics?

Sadly not. That’s the method I currently use, but as I mentioned above it doesn’t replicate physics until the client receives an update on the other client’s character from the server (e.g when they make their first movement); so they are able to be pushed over/moved by the client who they were parented on.