Character Scale Problem

Hello! I’ve been trying to script a daycare game, but it has been really difficult because I can’t make non-group members small (as a toddler). But if they’re a certain rank in the group, they’ll be normal size. I tried looking up tutorials about character scaling, but it never works. If you could help me, I apricate it!

Example:
https://www.roblox.com/games/345387015/PETS-Little-Angels-Daycare
https://www.roblox.com/games/1046870993/Little-Dreamies-Daycare

2 Likes

Sorry I’m a bit confused.

Is the issue that you don’t know how to scale the player, or that you don’t know how to check if the player is a certain rank?

EDIT:
I now understand. Here’s how you do it:

        local Humanoid = ReplaceThisWithHowYouAreGettingTheHumanoid()

		local HS = Humanoid.HeadScale
		local BDS = Humanoid.BodyDepthScale
		local BWS = Humanoid.BodyWidthScale
		local BHS = Humanoid.BodyHeightScale

        HS.Value = HS.Value * ReplaceWithYourCustomScale
		BDS.Value = BDS.Value * ReplaceWithYourCustomScale
		BWS.Value = BWS.Value * ReplaceWithYourCustomScale
		BHS.Value = BHS.Value * ReplaceWithYourCustomScale

This question (of sizing) has been asked many times. Please search it up

https://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup

Both, basically

random text random text

Here are a bunch of links I’ve gathered on both problems.

local shrink_val = 0.5

local player = game.Players.LocalPlayer



game.Players.PlayerAdded:Connect(function(Player)
	if Player:GetRankInGroup(4594985) == 200 then
		player.Character.Humanoid.HeadScale.Value = shrink_val
		
		player.Character.Humanoid.BodyDepthScale.Value = shrink_val

		player.Character.Humanoid.BodyWidthScale.Value = shrink_val

		player.Character.Humanoid.BodyHeightScale.Value = shrink_val

		player.Character.Humanoid.WalkSpeed = 50

		player.Character.Humanoid.JumpPower = 100

		game.Workspace.CurrentCamera.FieldOfView = 25
	end
end)

I tried, but didn’t work

Maybe try on a normal script? Somewhere I have a script for this. Give me a second to find it. . . .

Almost found it. . . .

Try this? Pretty sure this is what I did:

local HS = Humanoid.HeadScale
local BDS = Humanoid.BodyDepthScale
local BWS = Humanoid.BodyWidthScale
local BHS = Humanoid.BodyHeightScale

HS.Value = HS.Value * 2
BDS.Value = BDS.Value * 2
BWS.Value = BWS.Value * 2
BHS.Value = BHS.Value * 2

still not working


image

Which script is the error from?

There is only 1 script, the character scale

Are you doing this from a localscript? If so it won’t work.

This line of code:

local Humanoid = game.Players.LocalPlayer.player.Character()

is only possible in a localscript.

im using a normal script

random text

Then you cannot get the LocalPlayer.

Replace all that code with this:

game.Players.PlayerAdded:Connect(function(Player)
    if Player:GetRankInGroup(4594985) == 200 then
        local Humanoid = Player.Character.Humanoid

		local HS = Humanoid.HeadScale
		local BDS = Humanoid.BodyDepthScale
		local BWS = Humanoid.BodyWidthScale
		local BHS = Humanoid.BodyHeightScale

        HS.Value = HS.Value * 2
		BDS.Value = BDS.Value * 2
		BWS.Value = BWS.Value * 2
		BHS.Value = BHS.Value * 2
    end
end)

You probably deleted a bracket.

Also, I realized a bit after I posted that it wouldn’t work.

This new code should work:

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Humanoid = Character.Humanoid

		local HS = Humanoid.HeadScale
		local BDS = Humanoid.BodyDepthScale
		local BWS = Humanoid.BodyWidthScale
		local BHS = Humanoid.BodyHeightScale

		HS.Value = HS.Value * 2
		BDS.Value = BDS.Value * 2
		BWS.Value = BWS.Value * 2
		BHS.Value = BHS.Value * 2
	end)
end)
2 Likes