Skip to content

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 an event is blocked by the RemoteEventValidator.

Properties

Name

event.Name: string
The name of the RemoteEventWrapper.

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
)
See: 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.