How to give a Player message if low on cash

I’m basically making a shop and I want a message to show if a player doesn’t have enough money this is the code I’m using but it doesn’t work.

		if Player.leaderstats.Points < 500 then
			Frame.MedKitText.Enough.Visible = true
			wait(5)
			Frame.MedKitText.Enough.Visible = false
			
		else
		game.ReplicatedStorage.Buy:FireServer()
		
		
	end
	end)
	
end)

You need to use the .Changed event to detect changes in an IntValue in this case so it detects a change, it’ll run the code again, it probably only happens once

.Changed

Okay I did not read that very carefully, I immediately defaulted to the wrong thing haha

Well you would click a gui then it would tell you if you don’t have enough E

17:16:53.979 Players.Tunnells.PlayerGui.ShopHandler:25: attempt to compare Instance and number - Client - ShopHandler:25

Add .Value:

if Player.leaderstats.Points.Value < 500 then