Skip to main content

Set

Overwrites the value at the given path by the new value.

Parameters:

NameTypeDescription
playerplayerThe player whose data we want to access
pathstringThe path to the user data
newValueanyThe value that will overwrite the old value

Returns:

NameTypeDescription
oldValueanyReturns the old value that existed before the overwrite

Example:

local ServerScriptService = game:GetService("ServerScriptService")
local ProStore3 = require(ServerScriptService.ProStore3)

ProStore3.PlayerJoined:Connect(function(player : Player)
ProStore3.Set(player, "Level", 3)
print("Level after set: ", ProStore3.Get(player, "Level"))
end)