- What do you want to achieve? Keep it simple and clear!
I want a function that checks if there’s a objectValue inside a specified instance, if true then
change the specified instance parent to the objectValue Value.
- What is the issue? Include screenshots / videos if possible!
I tried it with an Module:
local ZIP = {}
function ZIP.ChangeParent(instance)
local Path = instance:FindFirstChild("ZIPPATHVALUE")
if Path then
instance.Parent = Path.Value
return true
else
return nil
end
end
function ZIP.Unpack(Folder)
for i,v in pairs(Folder:GetChildren()) do
print(ZIP.ChangeParent(v))
end
end
return ZIP
and activated it in the command bar:
zip = require(game.ServerStorage.RoZip.ZIPModule)
zip.ChangeParent(workspace.dev.ZIP.putinlighting)
and it gave me an error:
Attempt to set parent of Workspace.dev.ZIP.putinlighting to Workspace.dev.ZIP.putinlighting.ZIPPATHVALUE would result in circular reference - Edit - ZIPModule:7
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked on Developer hub and nothing…
So I want help to remove the error or a new script…