function onTouch(part) --function local message = Instance.new('message',game.Workspace) --creates new message message.Text = "You touched a brick!" -- What the message says wait(2) -- how long before message is destroyed message:Destroy()--Destroys the message end script.Parent.Touched:connect(onTouch)
(puts a message on the screen)
On line 2, you did an error, you forgot to capitalize the 'M' in 'Message';
local message = Instance.new("Message",game.Workspace)