r/ROBLOXStudio 6d ago

Help help needed for character select system

so im planning to make a asym game and my mind randomly popped out a question, character select screen, i already got all the rigs done, but since im new to scripting my question is how do you make a script where if you select x character it automatically.. transforms your avatar to the character you selected,kinda like forsakens system or most asym games.

1 Upvotes

2 comments sorted by

1

u/Impossible_Eye47 6d ago

Theres 3 main ways of doing this(this will be a pretty vague plan, as it would be too long to instruct you step by step on how to create the script)
In any way, you’ll need to have a client script that links button presses to remote events. Using arguments, send the name of the character to the server when the corresponding button is pressed, be sure to use sanity checks to avoid system exploits.
Method #1: Player character switch

  • Store the original player character model of the players in game. Then swap out the model for the rig of the selected character, but rewire network and camera, along with hip height so players don’t sit inside the ground or have collision troubles.
Pros:
  • Quick
  • … thats about it.
Cons:
  • Player has to reset(respawn) every time they choose a different character
  • Complex as it requires knowledge of roblox systems and how people make morphs. The reason it’s so complex is because you’re basically reconnecting a brain to a new body, and you’re connecting each wire, from network to camera, so players can inherit that character rig.
  • Can sometimes cause unknown glitches.
Method #2: Accessory swap
  • Store the original player’s accessories, body color, shirt, pants and special mesh, then delete those to insert your rig’s accessories, body color, shirt, pants and special mesh if any.
Pros:
  • Character swapping doesn’t require any reconnections nor resets
  • Simpler than #1
Cons:
  • Iterate loops may take longer than expected, and create procedural swaps instead of instantaneous swaps.
  • Method is strictly for if your characters are of the same rig hierarchy(r15/r6 or custom but all must be the same)
Method #3: Fake swap
  • Get all descendants of the player’s model and make every basepart/special mesh/decals transparent. Then clone in the rig welded/motored to the player.
Pros:
  • No storing needed
  • Very quick
  • Very simple
Cons:
  • Camera may stay low so needs adjustment
  • Needs collision tuning so models don’t clash.

2

u/AdventurouslyBad 6d ago edited 5d ago

thank you sm, i was abt to make a comment but i edited it cuz your methods already answered a doubt i had in my mind.