Glorpia Docs
Instances

RemoteFunction

Request/response communication between creator LocalScripts and ServerScripts.

Members

NameTypeDescription
MaxRequestsPerMinutenumberMaximum requests accepted per minute per Player. 0 disables the limit.
ReliabilityEnum.NetworkReliabilityReliable keeps ordered delivery. Unreliable may discard an older pending packet when superseded by a newer packet for the same remote and target.
PayloadEnum.RemotePayloadDefault permits every supported remote value type. Custom enforces AllowedPayloadTypes.
AllowedPayloadTypesarraySaved list of payload types allowed when Payload is Custom. Studio displays this list as checkboxes.
TimeoutnumberHard native request timeout in seconds. The default is 30 seconds. A request that does not receive a response before the deadline raises a timeout error.
NetworkPriorityEnum.NetworkPriorityRanks queued remote traffic as High, Medium, Default, or Low.
InvokeServer(...)LocalScriptCalls the server callback and yields until its return values arrive.
OnServerInvokeServerScript callbackAssign a function that receives the sending Player followed by the invocation arguments.
InvokeClient(player, ...)ServerScriptCalls one client's callback and yields until its return values arrive.
OnClientInvokeLocalScript callbackAssign a function that handles an invocation from the server.

Example: client asks the server

Luau
-- ServerScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local getRound = ReplicatedStorage:WaitForChild("GetRound")

getRound.OnServerInvoke = function(player)
    return 3, "Playing"
end
Luau
-- LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local getRound = ReplicatedStorage:WaitForChild("GetRound")

local round, state = getRound:InvokeServer()
print(round, state)

Network configuration

Luau
-- ServerScript runtime configuration
getRound.MaxRequestsPerMinute = 30
getRound.Reliability = Enum.NetworkReliability.Reliable
getRound.Payload = Enum.RemotePayload.Custom
getRound.AllowedPayloadTypes = { "Number", "String", "Player" }
getRound.Timeout = 5
getRound.NetworkPriority = Enum.NetworkPriority.Medium

When Payload is Custom, Studio shows checkboxes for Nil, Boolean, Number, String, Vector3, Color3, Instance, Player, and Table. The checked values are saved as an array.

For Reliability = Enum.NetworkReliability.Unreliable, an invocation or response can be discarded when superseded before transmission. If that happens, the caller remains protected by Timeout.

Arguments and returns

RemoteFunction arguments and return values support nil, booleans, numbers, strings, Vector3, Color3/Colour3, Instances, Players and nested tables containing supported values. Custom payload rules are enforced on both send and receive.

Only one callback is assigned to OnServerInvoke or OnClientInvoke. Use a RemoteEvent when a return value is not needed.

Related