|
| 26 Dec 2014 05:29 PM |
local message = Instance.new("Message") message.text = 'Hello World' message.parent = game.Workspace wait(5) message:Remove()
It says, "text is not a valid member of message" and apparently there's a mistake on line two, too. I'm just now trying to learn how to script, and this book I got for Christmas is kind of out of date with the new studio. What do I need to do to fix it? |
|
|
| Report Abuse |
|
|
| |
|
Aalok
|
  |
| Joined: 20 Jun 2014 |
| Total Posts: 1136 |
|
|
| 26 Dec 2014 05:32 PM |
Remember, in scripts, capitals count.
So you would have to change parent to Parent, and text to Text. |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Dec 2014 05:33 PM |
properties are case sensitive
.text should be .Text .parent should be .Parent |
|
|
| Report Abuse |
|
|
Aalok
|
  |
| Joined: 20 Jun 2014 |
| Total Posts: 1136 |
|
|
| 26 Dec 2014 05:34 PM |
Also, you are using more deprecated (old) methods. Pretty soon these ways will break your script, so use this:
local message = Instance.new("Message", workspace) --workspace = game.Workspace; a local variable message.Text = 'Hello World' wait(5) message:Destroy();
|
|
|
| Report Abuse |
|
|
| |
|