of     1   

jimmysnow02
#169836237Monday, August 03, 2015 8:12 PM GMT

local brick = game.Workspace.Brick brick.BrickColor = BrickColor.new("Brown") function onTouch(part) brick.instance.new("Sound") wait(1) brick.Sound.Content = ("http://www.roblox.com/Asset/?id=130833677") brick.Sound:play() print("*poot*") end the first 2 lines work, but the function doesn't
jimmysnow02
#169836332Monday, August 03, 2015 8:13 PM GMT

oh whoops forget the connect >.<
litalela
#169836551Monday, August 03, 2015 8:15 PM GMT

local brick = game.Workspace.Brick -- would be better to put in brick and do script.Parent brick.BrickColor = BrickColor.new("Brown") brick.Touched:connect(function(hit) local sound = Instance.new("Sound", brick) wait(1) sound.SoundId = "http://www.roblox.com/Asset/?id=130833677" sound:Play() end)
myactivetestplace
#169836706Monday, August 03, 2015 8:16 PM GMT

local brick = game.Workspace.Brick local debounce = false brick.BrickColor = BrickColor.new("Brown") --[[Move this to after your function if you want it to change after being touched otherwise it will when the server runs.]]-- script.Parent.Touched:connect(function(part) if debounce == false then debounce = true brick.instance.new("Sound") wait(1) brick.Sound.Content = ("http://www.roblox.com/Asset/?id=130833677") brick.Sound:play() print("*poot*") end debounce = false end)
myactivetestplace
#169836929Monday, August 03, 2015 8:18 PM GMT

If this script is in workspace use this local b = game.Workspace.Brick -- What you define after local could be as short as b local debounce = false brick.BrickColor = BrickColor.new("Brown") --[[Move this to after your function if you want it to change after being touched otherwise it will when the server runs.]]-- b.Touched:connect(function(part) if debounce == false then debounce = true brick.instance.new("Sound") wait(1) brick.Sound.Content = ("http://www.roblox.com/Asset/?id=130833677") brick.Sound:play() print("*poot*") end debounce = false end)
jimmysnow02
#169851379Monday, August 03, 2015 10:36 PM GMT

i got it myself already but thanks anyway guys

    of     1