local r = Workspace.Part
function onTouch (part)
r.Material = random ()
wait (5)
end
a.Touched:connect(onTouch)
I am trying to get it so when you touch the brick it, it switches to a random Material. Can someone please tell me what is wrong here?

7 comments
Well how would I do that? I thought of it but I am a brginner so I have no idea how to. :(
I have a part that changes color and material whenever you touch it. You can get it and examine the code here:http://www.roblox.com/Improved-Lobby-Ball-item?id=139587781
Ok thank you
Oh it isnt a free model
When you find an answer, click "Accept Answer". It gives reputation to both you and the answerer!
I changed it to free. I thought that I set it to free, but then again, I made it about 9 months ago...
dangit when i use it its not showing up in the my models i need ur script