Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Forcing r15 block avatar?

Asked by 4 years ago

Hello, I am making a scp- type game. As the title explains... I would like to force the r15 block rig on the player but still keep their custom head. How would I do this? If you could get to me it would be appreciated. I didn't use any scripts.

1 answer

Log in to vote
0
Answered by
Elyzzia 1294 Moderation Voter
4 years ago
Edited 4 years ago

you can accomplish this with HumanoidDescriptions (https://developer.roblox.com/en-us/articles/humanoiddescription-system)

when CharacterAdded fires, you can apply a humanoid description to the player's character, but with the body parts set to 0 (which is the default)

the StarterCharacter should be the default block rig, since humanoid descriptions are only intended to be used with the default block rig

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local humanoidDesc = Players:GetHumanoidDescriptionFromUserId(player.UserId)
        humanoidDesc.Torso = 0
        humanoidDesc.LeftArm = 0
        humanoidDesc.RightArm = 0
        humanoidDesc.LeftLeg = 0
        humanoidDesc.RightLeg = 0
        local humanoid = character:FindFirstChildWhichIsA("Humanoid") -- in case your humanoids have a different name, for some reason
        humanoid:ApplyDescription(humanoidDesc)
    end)
end)

also, if you don't want players to be able to use custom body scaling, then add this

humanoidDesc.BodyTypeScale = 0
humanoidDesc.DepthScale = 1
humanoidDesc.HeadScale = 1
humanoidDesc.HeightScale = 1
humanoidDesc.ProportionScale = 0
humanoidDesc.WidthScale = 1
0
where would i put this? astroblox17 -11 — 4y
Ad

Answer this question