i have a remote function to send and receive a table from client to server, but calling upon this remote function takes a pretty long line of code. how will the remote function act in a local variable? will the remote function only get invoked once? or will it be invoked every time the variable is referenced?
update: i ended up putting the reference line to the remote function into a local function, and having the local function return the returned value from the remote function. this should have it invoke the remote function every time the local function is referenced, right?
The remote function will only be invoked when assigning the variable. You can invoke it again, just by reassigning the variable to the same remote event.
```
-- First time
local variable = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent").FireServer()
-- Second time
variable = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent").FireServer()
```
I'm not sure why its not showing up as code.