SetHealth not working?

Hi guys, I’m new to garrysmod development and I have recently been trying to create my own gamemode but have been stuck on one issue… my SetHealth doesn’t seem to SetHealth, no matter what I put the health just stays solid at 100, any ideas? every other variable works (run speed etc)

function GM:PlayerSpawn( ply )
	if ply:Team()== 1 then
		ply:Give( "Knife" )
		ply:SetGravity ( 2 )
		ply:SetWalkSpeed( 10 )
		ply:SetRunSpeed( 10 )
		ply:SetMaxHealth( 1000 )
		ply:SetHealth( 120 )


The player (ply) is an entity.

I don’t see why ply:SetHealth( amount ) wouldn’t work.

Yeah, it’d work fine; what made you want to do Entity instead of ply?

Oh I’ve tried ply and many other ways, it just so happened that entity was the last thing I tried
But yea I have it up on a server right now and the health amount just doesn’t change! I don’t understand why, could it be a visual bug?