Dodeca
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 13649 |
|
|
| 29 Dec 2014 04:29 PM |
trying to make it where you enter text into a textbox and then make it into a message by clicking a green button called MsgEnter, textbox is called Msg
function display() local m = Instance.new("Message") local msg = script.Parent.Msg m.Text = msg.Text wait(5) m:Remove() end
script.Parent.MsgEnter.MouseButton1Click:connect(display())
Errors: Attempt to connect failed: Passed value is not a function attempt to call a nil value |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2014 04:32 PM |
| What lines of script? It might be because you didn't give the instance a parent. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2014 04:35 PM |
| When you call the function at the end, remove the parenthesis so instead of (display()) have (display) |
|
|
| Report Abuse |
|
|
Dodeca
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 13649 |
|
|
| 29 Dec 2014 04:43 PM |
can you explain to me the :ToNumber() method?
I had this before added in the script
local t = script.Parent.Time.Text:ToNumber()
and then wait(t)
but it didnt work |
|
|
| Report Abuse |
|
|
Dodeca
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 13649 |
|
|
| 29 Dec 2014 04:46 PM |
ah i fixed
wait(tonumber(t)) |
|
|
| Report Abuse |
|
|