These are global values that exists in the ZSharp environment.


ZSharp globals

Class & Methods

Type Key
string ScriptName
   
table Audio
table TweenService
table Instance
   
function help
function log
function new

Classes


Methods

nil help(path: string)

  • Outputs help hints and descriptions.
  • Any tables within ZSharp can be explored into with help.

Examples:

help("Audio.Play"); -- Shows you how to use Audio.Play.

help("Instance.Classes"); -- Shows you all available classes

help("Instance.List"); -- Shows you how to use Instance.List.

nil log(…)

  • Basically print, but properly formats value.

Instance new(className: string)

  • Instantiates a new instance of ClassName.

Examples:

  • Spawns a new sound with volume set to 1 and assign a SoundId.
local sound = new("Sound"){
	Volume = 1;
	SoundId = "rbxassetid://3430334696"; -- "Collectible"
};

task.wait(3);

sound:Play();

Globals

Lua

Type Key
function getfenv
function ipairs
table math
function next
function pairs
function pcall
function print
table string
function select
table table
table task
function tick
function tonumber
function tostring
function typeof
function unpack

Roblox

Type Key
Enums Enum
table CFrame
table Random
table Vector2
table Vector3