I am trying to make a charecter smaller if a player is in a group id below 3. This is what I have got so far and i have no idea why its not working.
group = (5155684)
game.Players.PlayerAdded:Connect(function(Player)
if Player:GetRankInGroup(group) < 255 then
print("Im going to make the child a kid now")
local scale_to_be = 3;
local hum = Player:WaitForChild("Humanoid"); -- The Humanoid of the Character.
local scales = { -- Table with all of the Scales under the Humanoid.
hum:WaitForChild("BodyHeightScale"),
hum:WaitForChild("BodyDepthScale"),
hum:WaitForChild("BodyWidthScale"),
hum:WaitForChild("HeadScale")
}
for _, scale in next, scales do
scale.Value = scale_to_be;
end -- end for the for each iteration.
print("Player should be kid...")
else
print("Player is staff.")
end
end)
The 255 in the getrankingroup thing is in order to test.
