You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I’m trying to make my game have the default “Blocky” character build and I have run into an issue.
What is the issue? Include screenshots / videos if possible!
My issue is that when I try to change my character’s, Humanoid’s, HumanoidDescription properties, nothing changes. Maybe I’m doing this wrong, but here’s my script:
I tried to keep it simple
for _, player in pairs(game.Players:GetChildren()) do
local humanoid = nil
if player.Name == "Handles" then
print("bruh")
else
humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
humanoid.HumanoidDescription.Torso = 0
print(humanoid.HumanoidDescription.Torso)
end
end
I’ve looked around here on the forums and yet to no avail so here I am creating a topic that could probably be solved easily by someone with more experience. Also, the print is in fact 0 and I even used the API documentation to aid in this task. HumanoidDescription | Roblox Creator Documentation
Um, I’m not sure if you saw but I am trying to change the body type, from what I read that basically loads the players default if I’m not mistaken (which I very well might be).
Ohhhh I see now, thank you for helping me with this difficult challenge, that as I’ve predicted, could be easily solved by one of a higher experience level. Once again, my greatest thanks! Cheers.
ok so i tried that and it still doesn’t work, there’s no error, but here’s my code:
I know it’s messy but it’s quite late for me
local Players = game:GetService("Players")
local function onCharacterAdded(character)
local player = nil
local function getPlayerFromCharacter(character)
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
if player.Character == character then
player = player
return player
end
end
end
local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
local descriptionClone = humanoid:GetAppliedDescription()
descriptionClone.Torso = 0
descriptionClone.RightLeg = 0
descriptionClone.RightArm = 0
descriptionClone.LeftLeg = 0
descriptionClone.LeftArm = 0
humanoid:ApplyDescription(descriptionClone)
end
local Players = game:GetService("Players")
local function onCharacterAdded(character)
local player
local function getPlayerFromCharacter(character)
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
if player.Character == character then
return player
end
end
end
player = getPlayerFromCharacter(character)
local humanoid = player and (player.Character and player.Character:FindFirstChildOfClass("Humanoid"))
if humanoid then
local descriptionClone = humanoid:GetAppliedDescription()
descriptionClone.Torso = 0
descriptionClone.RightLeg = 0
descriptionClone.RightArm = 0
descriptionClone.LeftLeg = 0
descriptionClone.LeftArm = 0
humanoid:ApplyDescription(descriptionClone)
else
warn("Humanoid not found") --This is optional
end
end
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(onCharacterAdded)
end)