how to change the players avatar to the blocky in roblox with code examples

Roblox is a popular online gaming platform with millions of users worldwide. One of the great features of Roblox is the ability to customize your avatar. There are tons of different options to choose from, but if you want a classic blocky look, you’re in luck! In this article, we’ll explain how to change your avatar to the blocky style using code examples.

Step 1: Create a New Avatar

Before we dive into the code, you’ll need to create a new avatar to replace your current one. To do this, navigate to the “Avatar” section of the Roblox website or app. From there, select “Create new avatar” and choose the blocky style. This will give you a new avatar with a blocky head and body.

Step 2: Use Scripting to Change Your Avatar

Now that you have a new avatar with a blocky style, it’s time to use scripting to switch to it. Navigate to the “Develop” tab on the Roblox website and open up a new place. Create a new script by clicking on “ServerScriptService” and then clicking on “Create Script.” This will open up a blank script editor.

Next, we’ll need to add some code to our script. The code below will change the player’s avatar to the blocky style. Copy and paste this code into your script editor and save.

local Players = game:GetService("Players")

function onPlayerAdded(player)
        if character.Head.Transparency ~= 1 then
            character.Head.Transparency = 1
            character.Head.BlockMesh.Enabled = true
            character.Head.BlockMesh.Scale =,2,2)
            character.Head.BlockMesh.Name = "HeadMesh"
        if character:FindFirstChild("Humanoid") then
            character.Humanoid.BodyType = Enum.BodyType.Custom
            character.Humanoid.RootPart.Size =, 2, 2)
            character.Humanoid.RootPart.Name = "HumanoidRootPart"


for _,player in pairs(Players:GetPlayers()) do

This code listens for when a player joins the game and modifies their avatar to be blocky. It does this by checking the transparency of the character’s head and then enabling the BlockMesh component. It also sets the scale and name of the BlockMesh. Additionally, it changes the BodyType and size of the humanoid to match the blocky style.

Step 3: Test Your Code

Now that you’ve added the code to change the player’s avatar to the blocky style, it’s time to test it out. Run your game and join as a player. You should see your avatar change to the blocky style. If you don’t, double-check your code and make sure everything is configured correctly.

Step 4: Modify Your Code

If you want to customize the blocky style further, you can modify the code we’ve provided. For example, you could change the size of the BlockMesh or adjust the BodyType of the humanoid. You could also add additional components to the BlockMesh to add more detail.


Customizing your avatar in Roblox is a great way to stand out and show off your style. The blocky style is a classic look that many players enjoy. By using scripting, you can change your avatar to the blocky style with just a few lines of code. We hope this article has been helpful and that you enjoy your new blocky avatar!

I’d be happy to provide more information on any of the topics we’ve discussed. Just let me know which one you’d like me to expand on and I’ll get started!

Popular questions

Certainly! Here are 5 questions and answers related to changing a player's avatar to the blocky style in Roblox using code examples:

  1. Q: What is the purpose of the transparency check in the code?
    A: The transparency check determines whether or not the player's avatar already has the blocky style applied. If the character's head is already transparent, it means that the blocky style has already been applied and the code will skip to the next step.

  2. Q: Can the blocky style be applied to other body parts or just the head?
    A: While the code example provided focuses on modifying the character's head to be blocky, the same principles can be applied to other body parts using similar code.

  3. Q: Is it possible to apply the blocky style to only certain players or groups of players?
    A: Yes, it is possible to modify the code to apply the blocky style to only certain players or groups of players based on specific conditions. For example, you could create a whitelist of players or groups that should have the blocky style applied and modify the code to check for those conditions before applying the style.

  4. Q: How can I modify the scale and size of the blocky avatar?
    A: In the provided code example, you can modify the scale and size of the blocky avatar by adjusting the Vector3 values for the BlockMesh scale and RootPart size. For example, changing,2,2) to,3,3) would increase the size of the blocky head.

  5. Q: Will changing my avatar to the blocky style affect my game performance?
    A: In most cases, changing the avatar to the blocky style should not significantly affect game performance. However, if you add a large number of BlockMesh components or other customizations, it could potentially cause lag or slowdowns. It's always a good idea to test your code and make sure it doesn't impact game performance in a negative way.



As a senior DevOps Engineer, I possess extensive experience in cloud-native technologies. With my knowledge of the latest DevOps tools and technologies, I can assist your organization in growing and thriving. I am passionate about learning about modern technologies on a daily basis. My area of expertise includes, but is not limited to, Linux, Solaris, and Windows Servers, as well as Docker, K8s (AKS), Jenkins, Azure DevOps, AWS, Azure, Git, GitHub, Terraform, Ansible, Prometheus, Grafana, and Bash.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top