Still have questions? Join our Discord server and get real time help.
Log in to vote

I can't find BodyWidthScale, BodyDepthScale and BodyHeightScale in-game?

Asked by
oilsauce 175
7 months ago

The below code is supposed to find the BodyWidthScale, BodyHeightScale and BodyDepthScale inside the R15 Character's Humanoid. It does work in Studio, however, if I run this in a server, None of these Values are a child of Humanoid, in fact, they aren't even a descendant of the Character.

Did ROBLOX remove these Values? If they did, are there any other way to get the Scale properties of R15 Character bodies?

The script is being ran in a Server-Script.

local plrs = game:GetService("Players")
        local hum = char:WaitForChild("Humanoid")
        local BW = hum:WaitForChild("BodyWidthScale")
        local BH = hum:WaitForChild("BodyHeightScale")
        local BD = hum:WaitForChild("BodyDepthScale")


-- Infinite yield possible on [character].Humanoid:WaitForChild("BodyWidthScale")

1 answer

Log in to vote
Answered by 7 months ago

They are, children of the Humanoid, and that output message is just a warning, it will always be there when you use WaitForChild. It does not break scripts. The message is just saying the script could yield indefinitely if the child were to not be found. It is nothing to worry about, because the script didn't wait too long for the child.

On a side note, :connect() is deprecated, use :Connect() instead.

If he's getting the message though, there is a high chance that the script /is/ actually yielding forever because it cannot find the child. This isn't always the case but a lot of the times it is. chomboghai 1903 — 7mo
OP later commented that "print(hum.BodyDepthScale == true)" printed false, which I later commented that it did that because objects are not booleans. They are truthy, but are not true. User#19524 2 — 7mo

Answer this question