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

It says method 'destroy' a nil value?

Message.Text="Survive the killer, follow the defender of the innocents."
wait(5)
Message.Text:destroy()

Why?

1 comment

1

Message.Text is a string value. You need to call Instance::Destroy on the message object directly.

2 answers

It's because the Destroy method is not a method of the Text of a Message. You have to use the Destroy method on the Message itself, not the text;

Message.Text="Survive the killer, follow the defender of the innocents."
wait(5)
Message:Destroy() --Is not case sensative, guy below is wrong.

Hope I Helped

+1

5 comments

0

"The guy below is wrong" our code is exactly the same thing...

0

You even made it :Destroy() rather than :destroy()

0

Nah, you were wrong in how you explained why he was wrong. The Destroy method isn't case sensitive; therefore, that's not why he got it wrong; therefore, that's why you were wrong(:

0

But I still posted the same code, so I got it right :)

0

Guy below has the same code, except this one has a comment. :P

Simply make the D in :Destroy() capital and just remove the message

Sorry I was told it was case sensitive. Too bad I still posted the right code and got -5... >logic

Message.Text="Survive the killer, follow the defender of the innocents."
wait(5)
Message:Destroy()

http://www.roblox.com/Forum/ShowPost.aspx?PostID=122235403

2 comments

0

You have to make absolutely sure your code is correct when you post an answer. If you don't know, look it up or test. Bad answers reflect badly on all of us here, not just you personally.

0

I know. I just had not realised that :Destroy() was not case sensitive, since most functions are.

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