Net messages help.

Hey, I made a 3d2d button and I want it to, let’s say set the armor of the player that pressed it to 100.

CLIENT:


self.p = self.p or tdui.Create()
    
    local p = self.p
    local ply = LocalPlayer()

    -- Draw a button (text, font, x, y, w, h, [color])
    local isMouseOrUseDown = p:Button("$500", "AmmoM", 65,9, 50, 50)
    if isMouseOrUseDown then 

      

	net.Start("ButtonPress")
	net.SendToServer()
	      
          
    end
    p:Cursor()
    p:Render(posss + offset3, angss, 0.15)
    
end

SERVER:


util.AddNetworkString("ButtonPress")
net.Receive("ButtonPress",function( len, ply )

     ply:SetArmor(100)


end)
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("tdui.lua")
include("shared.lua")


If I do just a print it does work but the setarmor doesn’t work for some reason. Also it’s not giving me any errors.