-- Also when using the GetFullName() function, why does it get the parent of the instance too For example game:GetFullName() >>>>> game workspace:GetFullName() >>>>> game.workspace
Why does it also get the game, which is the parent, instead of only the name"workspace"
-- Is there a way of getting the name of the "workspace" without having the parent before? which in this case, is game
Instance:GetFullName() Get's the FULL path to the Instance.
Instance.Name gets the Name of the Instance.
Instance.Parent.Name gets the Instance's Parent name.
Examples:
local Model = Instance.new("Model",workspace) local Part = Instance.new("Part",Model) print(Part:GetFullName()) --> game.Workspace.Model.Part print(Part.Name) --> Part print(Part.Parent.Name) --> Model print(Part.Parent.Parent.Name) --> Workspace print(Part.Parent:GetFullName()) --> game.Workspace.Model
-Edit- Added examples to make answer more clear.