PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

CreatorId

DataModel

int64

This property describes the ID of the user or group that owns the Articles/Place|place

If the DataModel/CreatorType property is ’User’ then CreatorId will be the Player/UserId of the place’s owner. If the DataModel/CreatorType is ’Group’ then CreatorId will be the ID of the group that owns the place.


Code Samples


Detect when the place owner joins the game

This code sample will print an output when the user that owns the game, or a member of the group that owns the game joins the server.

To run this script, place it inside a Script in ServerScriptService

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    if game.CreatorType == Enum.CreatorType.User then
        if player.UserId == game.CreatorId then
            print("The place owner has joined the game!")
        end
    elseif game.CreatorType == Enum.CreatorType.Group then
        if player:IsInGroup(game.CreatorId) then
            print("A member of the group that owns the place has joined the game!")
        end
    end
end)