I'm a new scripter and just figured out about functions. So far I made a function where when you click a brick, it turns transparent and cancollide is false. I'm trying to make a script where you click it and it plays a sound. I'm still trying to figure this out. Please don't make fun, I'm a noob I know. Instance.new("ClickDetector", script.Parent) s = Instance.new("Sound") function onClick() s.Name = ("Sound") s.SoundID = "rbxassetid://190126354" --Type Sound ID here dude. s.Volume = 2 --Volume. ####### # # ####### s.Looped = false --True means it repeats, false means it doesn't. s.archivable = false -- Probably don't have to change it. s:play() end ######## # ############## ########################################### I used the same script for the cancollide script cause I thought it would work. But I'm confused as to how functions work and stuff. Pls help, thank. |