Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script creates folders, but folders don't exist?

Asked by 2 years ago

--I'm new at scripting--

Anyway, this is part of my script that creates the folders

local Pets = Instance.new("Folder")
local Data = Instance.new("Folder")
local Index = Instance.new("Folder")
local Quest = Instance.new("Folder")

Pets.Name = "Pets"
Data.Name = "Data"
Index.Name = "IndexFolder"
Quest.Name = "Quests"

Pets.Parent = plr
Data.Parent = plr
Index.Parent = plr
Quest.Parent = plr

They did exist just yesterday, upon changing something which I forgot what it was, the folders just don't show up anymore, and yes, I've tried doing somethings like creating a new script, which would create them aswell, but that also didn't help. Other folders, like leaderstats, do exist, but not them.

1 answer

Log in to vote
0
Answered by 2 years ago

Fixed myself! The parenting of the Folders didn't execute because they were under a function which hasn't executed yet.

If you run into a problem like this, just put print("Went past (function or parenting as an example)") and if it prints, you know it works, if not, you have to put like the parenting further up!

Ad

Answer this question