So, im making a Weight Lifting Sim and im made a server script in ServerScriptService to change Character Size when the character appearance loads or when the strength value gets changed but it isn’t working and it’s not showing any errors
The Script:
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder", plr)
leaderstats.Name = "leaderstats"
local strength = Instance.new("NumberValue", leaderstats)
strength.Name = "Strength"
plr.CharacterAppearanceLoaded:Connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
local width = humanoid:WaitForChild("BodyWidthScale")
local height = humanoid:WaitForChild("BodyHeightScale")
local depth = humanoid:WaitForChild("BodyDepthScale")
local head = humanoid:WaitForChild("HeadScale")
width.Value = 0.5 + (strength.Value / 250)
height.Value = 1 + (strength.Value / 150)
depth.Value = 0.5 + (strength.Value / 250)
head.Value = 0.5 + (strength.Value / 250)
strength:GetPropertyChangedSignal("Value"):Connect(function()
width.Value = 0.5 + (strength.Value / 250)
height.Value = 1 + (strength.Value / 150)
depth.Value = 0.5 + (strength.Value / 250)
head.Value = 0.5 + (strength.Value / 250)
end)
end)
end)