So I have the path string, please note the string, how would I change it's parent? When I mean the path's string:
local x = game.Workspace.Part:GetFullName() -- returns: Workspace.Part
I've already tried methods such as:
game:FindFirstChild(x) -- Although this returns nil.
As TheLuaUser said, GetFullName
is mainly used for debugging purposes only.
Although, there is a way you could potentially get the object referred to by a string returned by the GetFullName
. Using string manipulation, you could do something like this:
function findObjectWithAbsolutePath(path) local obj = game for match in path:gmatch("%w+") do local obj = obj:FindFirstChild(match) if not obj then return nil end end return obj end findObjectWithAbsolutePath(object:GetFullName())
GetFullName is for print purposes only.
You should do local x = game.Workspace.Part
instead.