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

What can I change to make it work?

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)

1 answer

✓ Accepted answer

On line 2, you did an error, you forgot to capitalize the 'M' in 'Message';

local message = Instance.new("Message",game.Workspace)

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