Is it possible to convert this to R6? This script was built for R15.
If it isn’t possible, or if you have a solution please reply.
I changed the name of the number value- since there were a lot of ranks, right now this script is fully working.
Character Size
local Util = require(script.Util)
local Config = require(script.Config).Config
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local Role = player:GetRoleInGroup(Config.GroupId)
local scale = 1
if script.Sizing:FindFirstChild(Role)then
scale = script.Sizing[Role].Value
else
scale = Config.NotFoundScale
end
print(scale)
local hum = character:WaitForChild("Humanoid")
wait(1)
Util.scale(character.Humanoid, scale)
end)
end)
Config
local module = {
Config = {
GroupId = "4792643",
NotFoundScale = 1
}
}
return module
Util
local module = {}
function module.scale(hum,scl)
hum.BodyDepthScale.Value = scl
hum.BodyHeightScale.Value = scl
hum.BodyProportionScale.Value = scl
hum.BodyTypeScale.Value = scl
hum.BodyWidthScale.Value = scl
hum.HeadScale.Value = scl
end
return module