Sending Local Variables with .net

I’m trying to write data from local variables from the Client and send the variables to the server. I refuse to make the variables global because it is for a compensation system where everyone has new info. I even tried making them global and have a reset button, but that failed too.
How do I send data from Local Variables from the client side to the server using the net. commands? Other ways of tackling this are welcomed and encouraged. Thanks <3

The exact same way as sending globals. As long as your calls to the net library have the local in scope, you can send them. It’s no different.

Which net. would it be? Like WriteString, WriteData, WriteType etc.

Whatever type the variable holds.

You choose the type – whatever you need to send.

Alright. it’s
amounte.OnEnter = function(self)
amounttocomp = self:GetValue()
print("For: "…amounttocomp)
so its
local amounttocomp = nil
then it’s got an integer inside so simply net.WriteInt just to confirm? And thanks @sannys for the links. First one will help a ton

You don’t have to set amounttocomp back to nil; just do net.WriteInt(amounttocomp) in the OnEnter function.