Session
A session
Properties
key
Session.key:
TKey
The key
keyInfo
Session.keyInfo:
DataStoreKeyInfo
The DataStoreKeyInfo
data
Session.data:
TData
The data
isReleased
Session.isReleased:
boolean
Whether or not the session has been released.
isReleasing
Session.isReleasing:
boolean
Whether or not the session is currently being released.
store
Session.store:
Store
The store
released
SignalSession.released:
Signal
<
boolean
>
Fired whenever the session is released.
The first parameter is a boolean which is true
if the data saved, and
false
if the data could not be saved, this could be because the session was
stolen by a different server.
session.released:Connect(function(didSave)
print(`Session released! didSave: {didSave}`)
end)
Functions
new
Creates a session with the given key
and data
note
You're probably looking for Store:load
update
Session:
update
(
) →
Promise
<
(
)
>
Updates the session, saving all data and updating the Session.data and Session.keyInfo properties.
This will also release the session if a different server is requesting a release.
This will also stop the autosave in the current autosave cycle.
release
Session:
release
(
) →
Promise
<
(
)
>
Releases this session.