M = game.Workspace.Message MessageText = game.Workspace.Message.Text M.MessageText = "This is a place for scripts!, so why ya here. i got cameras!" wait(5) M.MessageText:Destroy() M.MessageText = "This" wait(1) M.MessageText:Destroy() M.MessageText = "is" wait(1) M.MessageText:Destroy() M.MessageText "a place for scripts. Like this message thingy." wait(3) M.MessageText:Destroy()
That is my message script. So I named something called MessageText for shortcut. In the output it says that MessageText is not a valid member of Message. Why?
You can't make a variable of the Message's value.
You could do this:
local msg = workspace.msg
But not this:
local msg = workspace.msg.Text
This code, however, works and is much simpler.
local msg = game.Workspace.Message local msgs = {"This is a place for scripts! Why're you here? I got cameras!","This","is","a place for scripts. Like this message thingy."} for i, v in pairs(msgs) do msg.Text = v wait(1) end
(All of this is assuming that you have a message in the workspace.)
You are calling the shortcut wrong. Basically what you did wrong was you made two shortcuts, when you only needed one, and you called both shortcuts at the same time, saying that the second shortcut was a child of the first. M.MessageText is nil, or nonexistant.
MessageText is existant.
Another error you made is that you destroyed the message after everything, meaning that you completely erased it from the game. You cannot change the text of an erased message.
Your script should look like this:
MessageText = game.Workspace.Message.Text MessageText = "This is a place for scripts!, so why ya here. i got cameras!" wait(5) MessageText = "This" wait(1) MessageText = "is" wait(1) MessageText "a place for scripts. Like this message thingy." wait(3) MessageText:Destroy()--I left this one here because now you could completely remove the message from workspace, as you are done using it.