Script isn't working but doesnt show any errors

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)
1 Like

You didn’t out

Strength.Value = ??

So it just make it 0

I did that but still didn’t work

i believe CharacterAdded instead of Playeradded would be better as a side note

1 Like

forgot to say that the :GetPropertyChangedSignal is the function not working the other ones work fine

oh sorry, i just made it everytime the remote event gets fired instead of making it trigger everytime the strength changes and it worked, didnt know why it didnt work from the beginning