So I have a folder "Character" which stores a folder called Class
This Folder Stores:
It's very strange that I get the error below too, because when I do a print statement above the line where I get the error, it prints it perfectly. The print statement is:
print(CharacterFolder.Class.CharacterClassName.Value) print(CharacterFolder.Class.CharacterClassName.Name)
So for some reason I am getting this error:
02:23:44.107 - CharacterClassName is not a valid member of Folder
When I write this block of code:
-- Creates Character Folder local function CreateNewCharacterFolder(player, ChosenClass) local CharacterFolder = game.ServerStorage.Character:Clone() CharacterFolder.Parent = player.PlayerDataFolder CharacterFolder.Name = "Character "..CharacterNumberPresent -- The lines where I get the error are below CharacterFolder.Class.CharacterClassName.Name = ChosenClass CharacterFolder.Class.CharacterClassName.Value = ChosenClass end
Do :WaitForChild("") On each of them, because the script might load before the objects load. Or do wait(1) in the start of the script, but the first option is better (script will work faster)