RemoteEventWrapper¶
Overview¶
This object is a wrapper for RemoteEvents. To access the client-side version of the RemoteEventWrapper created on the server, use Skeptic.Events:GetEventAsnyc().
Events¶
OnServerEvent¶
event.OnServerEvent:Connect(function(
playerObject: Skeptic.PlayerObject,
...: any
) ... end)
Fires when a client calls event:FireServer(...).
ServerEventBlocked¶
event.ServerEventBlocked:Connect(function(
playerObject: Skeptic.PlayerObject,
reason: string,
blockedArgument: any?
) ... end)
See: RemoteEventValidator
Fires when this event is blocked by the RemoteEventValidator.
ServerEventRateLimited¶
event.ServerEventRateLimited:Connect(function(
playerObject: Skeptic.PlayerObject,
message: string
) ... end)
Fires when this event is ratelimited.
Properties¶
Name¶
event.Name: string
RemoteEvent¶
event.RemoteEvent: RemoteEvent
A reference to the actual RemoteEvent created by the wrapper.
Warning
Avoid directly accessing this RemoteEvent, as lots of functionality is reliant on aspects of it on both the server- and client-side.
Methods¶
FireClient¶
event:FireClient(
player: Player | Skeptic.PlayerObject,
...: any
)
Fire an event to a specific client.
FireClients¶
event:FireClients(
players: { Player | Skeptic.PlayerObject },
...: any
)
Fire an event to a list of clients.
FireAllClients¶
event:FireAllClients(
...: any
)
Fire an event to all clients loaded in the server.
FireAllExcept¶
event:FireAllExcept(
player: Player | Skeptic.PlayerObject,
...: any
)
Fire an event to all clients except the one specified.
SetValidator¶
event:SetValidator(
validator: Skeptic.Events.RemoteEventValidator
)
Assign a RemoteEventValidator to this event. Any arguments from an event that do not pass the validator will cause that event to be blocked. In this case, ServerEventBlocked will fire.
SetRateLimit¶
event:SetRateLimit(
rateLimit: number?
)
Set a ratelimit for this event ("rateLimit" is given in Hz). Ratelimiting is tracked and applied each second per player. The default ratelimit for all events is 65 Hz. Set "rateLimit" to nil to remove any ratelimits.