Definations TO Implements!
Reference
createServerRemoteEvents Function
Parameter - args:{client:FunctionObjects, server:FunctionObjects}
Remote Event Definations
Convert remote event Definations to functions.
Definations are needed to define with empty functions.
It will creates RemoteEvent
to ReplicatedStorage/rbx-remoteevent/*
.
client functions will be ServerRemoteSender class objects.
server functions will be OnClientEvent:Connection
functions.
createClientRemoteEvents Function
This is a yielding function.
It will WAITS RemoteEvent
creating of createServerRemoteEvents
.
Parameter - args: {client:FunctionObjects, server:FunctionObjects}
Remote events Definations
Simmilar with createServerRemoteEvents
but for client.
client functions will be FireServer
functions.
server functions will be OnServerEvent:Connection
functions.
Methods of ServerRemoteSender Class
fire(client, ...)
- send to one clientfireAll(...)
- send to all clientsfireWithout(client, ...)
- send to all without specific clientfires(clientArray, ...)
- send to partial clients
Example
common.ts
// Define Remote Event Reference;
client.ts
;; ; // Receive from ServerremoteEvent.client.youAre; // Send to ServerremoteEvent.server.whoAmImath.random, 'string', true;
server.ts
;; ; // Receive from ClientremoteEvent.server.whoAmI;