Scripts & runtimeOverviewNew · 0.744
getscriptname
Read the display name associated with a script object.
Details#
Returns the Name string exposed by a script-like userdata, or an empty string when no suitable name is available. This is a display name, not a unique path or stable script ID.
Examples#
Example
local ownScript = Instance.new("LocalScript")
ownScript.Name = "DocsExample"
print(getscriptname(ownScript)) -- DocsExample
ownScript:Destroy()