I want it to play music when the scripts parent is touched but it doesn't work can you fix my script?
music = game.Workspace.Music
function onTouch()
music:Play()
end
script.Parent.Touched(onTouch)
I want it to play music when the scripts parent is touched but it doesn't work can you fix my script?
music = game.Workspace.Music
function onTouch()
music:Play()
end
script.Parent.Touched(onTouch)
You forgot the :connect on the connection line, use this:
music = game.Workspace.Music
function onTouch()
music:Play()
end
script.Parent.Touched:connect(onTouch)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Whoops I made a stupid but simple mistake thanks!
It's alright, I make mistakes like that sometimes!