PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Creating A Custom Character

Creating A Custom Character

Prerequisites Have a project with an arena set up from the Arcade Action - Intro lesson
Lesson Time 10-15 minutes
Optional Handouts N/A
Learning Objectives
  • Understand the StarterCharacter folder as a way of modifying players in game
  • Change the default starting character to be a set of parts instead of a humanoid
  • Roblox provides a default human character for all games, but you can use any model you want for player characters. For this game, the player will pilot a ship made out of basic parts.

    Creating Player Ships

    All characters require a HumanoidRootPart to function as a character. The HumanoidRootPart is used to move characters around the world. The model for the ship will be made out of two parts. The main body of the ship will be the HumanoidRootPart. The second part will be made out of a sphere for the ship’s blaster.

    Making Different Ships

    If you chose to make the ship out of parts other than just one part, you might need to modify the given code to make everything work.


    1. Under Workspace, add a Model.
    Creating Models

    Models are used to group multiple parts or objects into a single object.


    1. Rename the model StarterCharacter. Make sure the capitalization is the same, since it will be used in the code.
    2. Inside of the StarterCharacter model, add a Part renamed HumanoidRootPart, and a Part renamed Blaster. Make sure to capitalize the parts the same as the image below.

    Set the Primary Part

    For the model to be able to move, the primary part for the model for the model needs to be set. In this case, the primary part will be HumanoidRootPart.

    1. Select the StarterCharacter Model.
    2. In the Properties window, set the PrimaryPart by clicking on PrimaryPart and then select HumanoidRootPart.

    Put the Ship Together

    The ship and blaster need to be placed at the center of the arena, and then scaled up a little. If the model is not placed at the center of the arena, it won’t work spawn properly. Instead of dragging the ship around, move the ship to precisely the right place by using the Properties window.

    1. Select HumanoidRootPart.
    2. In the Properties window, next to Position, type 1,4,0 to center it in the arena. Make sure to use commas to separate the values.
    1. To make the ship larger, change the size to about 8,8,8. It’s okay if your ship size is slightly different.
    1. Before positioning the Blaster, make sure Collisions are turned off.
    2. Position the Blaster at 1,4,-4 and set size to 4,4,4.
    1. Change the BrickColor or Material of HumanoidRootPart and Blaster to what you want the ship will look like.
    2. Now that the ship is made, playtest to see what happens.

    That doesn’t look good. Looks like the parts aren’t connected to each other.

    Weld The Blaster to the Ship

    To fix the problem at hand, glue the parts together using a WeldConstraint between the blaster and HumanoidRootPart.

    1. Stop the playtest.
    2. In the Explorer, under Workspace, add a WeldConstraint.
    1. Drag the WeldConstraint object to the Blaster in the StarterCharacter model.
    1. Under WeldConstraint, in the Properties window, set the Part0 to Blaster.
    1. Set the WeldConstraint’s Part1 to HumanoidRootPart.
    1. Playtest again and make sure the parts are welded together.

    Spawning Custom StarterCharacters

    Models for player characters need to be moved under StarterPlayer. If the model isn’t moved, the player’s Roblox avatar will spawn instead.

    Move into StarterPlayer

    1. Move the StarterCharacter model to StarterPlayer to overwrite the default player model. Once moved, the ship should disappear from the game window.
    1. Playtest the game to see the new custom character. The ship will fall from the sky.

    Overwrite Default Scripts

    Roblox will add certain default scripts for every player that joins the game. This saves time when developing a standard Roblox game, but causes problems with custom games like this one. For this game, replace the health, sound, and animation scripts.

    1. In the Explorer > StarterPlayer > StarterCharacterScripts add three Scripts. Rename them:
      • Animate
      • Health
      • Sound
    Don’t worry about adding code to these scripts, simply making them overrides the defaults.

    Troubleshooting the Custom Character

    Check the following if your ship isn’t spawning when you click Play Now.

    The ship Model:

    • Is named StarterCharacter.
    • Has two parts named HumanoidRootPart and Blaster.
    • Has HumanoidRootPart set as the primary part.
    • Is centered in the middle of the arena.
    • Has been moved to ServerStorage.

    These documents are licensed by Roblox Corporation under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Roblox, Powering Imagination, and Robux are trademarks of Roblox Corporation, registered in the United States and other countries.


    Previous Intro to the Arcade Action Game Next Adding Player Controls - Client vs Server