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

PlaceVersion

DataModel

int

This property describes the version of the Articles/Place|place the server is running on.

This version number corresponds with the version number shown under the Version History section of the Articles/Place|place’s settings. It is not the current version of the Roblox client.

In Roblox Studio, this property is set to 0.

When a server instance is created for a Articles/Place|place it is done so at the place’s current version. If the place is later updated whilst this server is running, the server will remain at its current version.

This property can be used to display a ScreenGui showing the current version of the game to Player|Players to assist with debugging.


Code Samples


Server version number GUI

This code sample will place a simple GUI in the StarterGui showing the place version the server is running at.

To use this sample, place it inside a Script in ServerScriptService.

local StarterGui = game:GetService("StarterGui")

-- create a screenGui
local versionGui = Instance.new("ScreenGui")

-- create a textLabel
local textLabel = Instance.new("TextLabel")

-- position in the bottom right corner
textLabel.Position = UDim2.new(1, -10, 1, 0)
textLabel.AnchorPoint = Vector2.new(1, 1)
textLabel.Size = UDim2.new(0, 150, 0, 40)

-- configure the text settings
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = Color3.new(1, 1, 1)
textLabel.TextStrokeTransparency = 0
textLabel.TextXAlignment = Enum.TextXAlignment.Right
textLabel.TextScaled = true

-- display the version number
local placeVersion = game.PlaceVersion
textLabel.Text = string.format("Server version: %s", placeVersion)
textLabel.Parent = versionGui

-- parent to the StarterGui
versionGui.Parent = StarterGui