Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Printing a "local" value didn't work?

Another yet LUA question, so that's preferred code below:

local P2000 = game.Workspace.P200Model
print(P200Model)

Now i am showing expected output (the output on other is unexpected);

-- P200Model

Now to output it did:

game.Workspace.P200Model is not local

(its wrong probably but i didnt check)

1 comment

0

The variable is P2000 not P200Model and you can't just print a model, you need to print it's name or any of it's attributes.

1 answer

✓ Accepted answer

Hello.

Sometimes, Scripts and LocalScripts load faster than the actual models in game. Your model P2000 is an Object. So you cannot dirrectly print it. Instead, you could do:

local MyModel = game.Workspace:WaitForChild("P200Model")
print(MyModel.Name) -- Name it's a Property.

This discussion is preserved as it was. New answers, comments, and votes are closed.