Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a gender select gui at start up of game?

I know how to make a gui I'm just confused on how I can make it so that when clicked on a certain gender, the player will spawn as that gender.

1 comment

0

Just make it visible inside of the starter gui.

2 answers

✓ Accepted answer

Well, these genders appearances aren't necessarily predefined, so you need to define them.

One approach, is searching the catalog and getting the assetids for the clothes that you want each gender to wear.

There is a method for the Player called ClearCharacterAppearance which removes all clothing/accessories from their character.

In order to make something run at spawn, use a function connected to the Player's CharacterAdded event.

You should either manually set their Pants/Shirts assetids, and insert hats, or use the LoadCharacterAppearance method of the Player.

Here are some links, you are likely to get more specific help if you post the code which shows your best attempt at what you are trying to do.

This is merely a GUI system. If you are experienced or have basic knowledge of GUI then you would make a UI with two buttons with both Male and Female(This is not to be taken in an offensive way) and have them set as a "TextButton, or an "ImageButton". Whichever you choose they both use an event called

MouseButton1Down() 
--or
MouseButton2Down()

You could change "Down" to "Up" or "Click"

These events all depend on what you plan to do.

Once you have the function set up with the even of your choice, you would then use..

game.Players.LocalPlayer.Team = game.Teams["Male or Female"]

This would be based on which team the button is linked too.

If you plan to use FilteredEnabled I can assist you on an FE method to get around your issue.

1 comment

0

A Side note to my answer, if you are looking to use FE you can use LoadCharacter() to respawn the character at the designated spawn location.

This discussion is preserved as it was. New answers, comments, and votes are closed.