RemoteProperty
Weaver's implementation of Knit's RemoteProperties.
Internally, these are simply RemoteEvents which can store different values for clients.
Types
RemoteConnectionCallback
Properties
Changed
This item only works when running on the server. ServerRemoteProperty.Changed:
Signal
Fires when the RemoteProperty's value has changed for any player. The first parameter will always be the Player
.
If the default value for the RemoteProperty was changed rather than a specific player's value, the first parameter will be nil
.
Changed
This item only works when running on the client. ClientRemoteProperty.Changed:
Signal
Fires when the RemoteProperty's value has changed. Note that this won't fire if the value that the server sets is the same as your currently registered value.
Functions
Set
This item only works when running on the server. ServerRemoteProperty:
Set
(
Default:
any?
) →
(
)
Sets the default value of the RemoteProperty, clearing all clients' custom values.
SetDefault
This item only works when running on the server. ServerRemoteProperty:
SetDefault
(
Default:
any?
) →
(
)
Sets the default value of the RemoteProperty without clearing all clients' custom values.
SetFor
This item only works when running on the server. ServerSets the value of this RemoteProperty for a specific client.
SetForEach
This item only works when running on the server. ServerSets the value of this RemoteProperty for the clients specified.
SetExcept
This item only works when running on the server. ServerSets the value of this RemoteProperty for all clients in the game, except for the clients specified.
SetFilter
This item only works when running on the server. ServerSets the value of this RemoteProparty for all clients in the game, using a filter to specify which clients have their values set.
Clear
This item only works when running on the server. ServerRemoteProperty:
Clear
(
) →
(
)
Clears all clients' custom values.
ClearFor
This item only works when running on the server. ServerClears the value set for a specific client.
ClearForEach
This item only works when running on the server. ServerClears the values set for the clients specified.
ClearExcept
This item only works when running on the server. ServerClears the value of all clients in the game, except for the clients specified.
ClearFilter
This item only works when running on the server. ServerClears the value of all clients in the game, using a filter to specify which clients receive the event.
Get
This item only works when running on the server. ServerRemoteProperty:
Get
(
) →
any?
Gets the current value of the RemoteProperty.
GetFor
This item only works when running on the server. ServerGets the current value of the RemoteProperty for Client
.
Get
This item only works when running on the client. ClientThis is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. YieldsRemoteProperty:
Get
(
) →
any?
Gets the current value of the RemoteProperty.
Yielding
This function will yield when you first call :Get()
if the server has not sent a Changed event at least once. If this is an issue that worries you, try calling :Get()
once in WeaverController:WeaverInit()
so that the value is guaranteed to exist.