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

I dont really know what "attempt to index nil with "etc" means?

Asked by 3 years ago

so basically, I have this script put in. and when I press play, it just says "Players.codergav.PlayerGui.MainGui5.Cutscenes.FinalCutscene:82: attempt to index nil with 'Parent' " here's the code so that you guys can help me out a bit. local player = game.Players.LocalPlayer (a few more lines of code, not relating whatsoever to my problem) local shiter = player.Character:Clone() player.Character.Archivable = false shiter.Parent = game.Workspace shiter.Name = "Model265"

and again, it says in output "Players.codergav.PlayerGui.MainGui5.Cutscenes.FinalCutscene:82: attempt to index nil with 'Parent' ". if you guys could help me out a bit, that'd help alot.

2 answers

Log in to vote
0
Answered by 3 years ago

It is actually nil and for a good reason, You've disabled the property "Archivable" which basically removes the ability for that asset to save in any instance, Whether it be saving it to studio or cloning it. Whatever the case is that Model will not be able to clone.

Try removing the line that disables the Archivable property or instead of making it false make it true, Keep in mind if the object your cloning has that property set to false It will not clone resulting in making it nil.

0
it didnt seem to work... I did it and it still says the same thing in output. codergav 0 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

Problematic code is shiter.Parent = game.Workspace shiter.Name = "Model265", this is not an instance but rather linking to a property. Im not sure what you're trying to do here but you should not have it linked to shiter.Parent as that property only works on instances such as workspace ServerStorage or any object for example. Best advice is to split them into separate lines and fill in shiter.Parent with whatever you were trying to do with it

0
Oh sorry i did not notice that there was no connection between game.Worksace ans shiter.Name, ignore my post therealrobloxianman2 0 — 3y

Answer this question