I am attempting to clone a model from ServerStorage into Workspace. There is weird stuff happening like when I print the PrimaryPart
’s name it prints the name but then immediately after gives an error: attempt to index nil with 'Name'
, implying the model’s PrimaryPart
is nil, but if so, how did it print its name?
The code is nothing special:
room = room:Clone()
print(room.PrimaryPart.Name) --this line prints its name, then errors immediately after
--the error and the print statement both happen on line 60
The code prior just chooses a random room from server storage. Again nothing special.
Model:
This is just weird, this might be an engine bug because I’m 99% sure that a statement should not work and then not work right after.