Changing a character's mesh ids (R15)

I’m trying to morph characters in a game I’m working on, similar to this game when you level up: https://www.roblox.com/games/1122519450/Titan-Simulator

Our game is using R15 rigs so all of the character’s parts are MeshParts. I thought I would be able to simply change the MeshId of the MeshParts in the character, but Roblox doesn’t let you change the MeshIds of MeshParts through scripts. Does anyone know how I can change how the players package looks without respawning them?

2 Likes

You can’t change a the MeshId of a MeshPart cause it’s Lock, idk why but would like to know why.

So how to achieve what you want?

Import the Package

Delete the Parts on the Character

Parent new parts onto the Character

Do this function Humanoid:BuildRigFromAttachments ()

http://wiki.roblox.com/index.php?title=API:Class/Humanoid/BuildRigFromAttachments

sometimes it might kill the player idk why, if someone has a fix or better way to do this please let us know.

Thanks

2 Likes

Don’t forget you have to disable the death state for the user on both the client and the server before switching. (That’s how you bypass the player dying)

5 Likes

The reason the MeshId of MeshParts is locked is due to collision.

http://wiki.roblox.com/index.php?title=API:Class/MeshPart/CollisionFidelity

This property is unscriptable, because the geometry of an object cannot be recomputed during run-time.

And as for you Encoded, RuizuKun and Spooks look to have put up the answer to that question.

3 Likes

That’s what I was thinking

1 Like

it’s been a few days and this question came to my head

http://wiki.roblox.com/index.php?title=API:Class/Humanoid/SetStateEnabled

This item should be used with a LocalScript in order to work as expected in online mode.

but you said

so how does that work?

Uhhh, I’ll take a look at this.

The function call doesn’t replicate across the server/client boundary. This issue is particularly problematic with the Dead state.

If you have the dead state disabled on the client but it’s enabled on the server, then the server will break the characters joints if you set the health to 0 on the server. The joint breaking will carry over to the client, and the server will forcefully respawn the character after 5 seconds.

Likewise, if you have the dead state disabled on the server, but it’s enabled on the client, then the client will trigger its joint breaking if it detects the Head was.disconnected, or the health was set to 0.

TL;DR - You have to set it on both the server and client to make sure results are as expected.

4 Likes

Is that how people used to be able to disable players resetting before they added ResetButtonCallback? Did they just disable the Death state?

1 Like

No, they would rename the Humanoid.

2 Likes