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

Print won't print the name of an Instance?

Asked by 8 years ago
x = game.Workspace.Testings.Mesh
local message = Instance.new('Message', game.Workspace) -- Insert a new message in the Workspace.
message.Text = (x) -- Set the text of the message to "Hello World!".
wait(10)
message:Destroy() -- Remove the message after 10 seconds.

0
Use `x.Name` or `tostring(x)`, don't bother with brackets. TheDeadlyPanther 2460 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

As TheDeadlyPanther said, you can either change it to "message.Text = x.Name" or "message.Text = tostring(x)"

If I have helped or answered your question please remember to accept the answer, and if not then please message me or comment what I could have done better!

Ad

Answer this question