sendButton.MouseButton1Click:connect(function() print'clicked' NewM(script.Parent.Parent.Parent.Parent, messageBox.Text) messageBox.Text = 'Message' end)
"clicked" is never printed, NewM is a valid function, and the message box's text is not changed. I haven't scripted in a while so I'm not sure about the MouseButton1Click event or anything.
Sorry to say, but you messed up an event. MouseButton1Click is not a real event. Please consider this code to replace the above :)
sendButton.MouseButton1Down:connect(function () print 'clicked' NewM(script.Parent.Parent.Parent.Parent, messageBox.Text) messageBox.Text = 'Message' end)