Workspace

Workspace : WorldRoot

Overview

Properties

CurrentCamera

Camera

This is the camera currently in use within the workspace.

Code Samples

local Workspace = game:GetService("Workspace")
local CurrentCamera = Workspace.CurrentCamera

print(CurrentCamera)

Gravity

number

Gravity is a fundamental force that attracts two objects with mass toward each other, causing them to fall towards the center of a planet or accelerate towards one another with varying levels of strength depending on their masses and distance. This force primarily affects falling and moving objects within various simulation environments, including those managed by Workspace, LuaWorkspaces, and game development platforms using Lua. Gravity is often represented as an acceleration value that influences the behavior of virtual objects in simulations or BaseParts in specific programming contexts.

Code Samples

local Workspace = game:GetService("Workspace")
Workspace.Gravity = 10000

MaxSlopeAngle

number

MaxSlopeAngle is a property or value representing the maximum angle at which surfaces can slope before becoming unclimbable, non-walkable, too steep, or inaccessible for characters and objects within various Lua workspaces. This property impacts gameplay, movement mechanics, object interactions, and terrain design across different environments. Its specific usage depends on the context of each Lua workspace implementation.

Code Samples

HitboxType

Enum.HitboxType

HitboxType specifies the type of hitbox used by the character. It can be configured for all characters via the Workspace, but runtime modification is not supported.

Code Samples

Methods

GetServerTimeNow

This method returns the current server time as a number. The server time is typically used for synchronization purposes. It provides an accurate and consistent time reference for various in-game actions or events.

Parameters

Return

number

Code Samples

local Workspace = game:GetService("Workspace")

print(Workspace:GetServerTimeNow())

Events

Last updated