My goal sound script won't work. Why?
01 | Goal = game.Workspace.Goal |
02 | Ball = game.Workspace.Ball |
03 | Message = game.Workspace.Message |
05 | GoalSound = game.Workspace.GoalSound |
06 | SoundID = GoalSound.SoundId |
07 | BoooSound = game.Workspace.BoooSound |
08 | SoundID = BoooSound,SoundId |
11 | function onTouched(Goal) |
16 | if Ball:onTouched(Goal) = = true then |
17 | Message.Text = "GOAL!!!" |
20 | GoalSound.SoundID:Play() |
21 | GoalSound.SoundID:Stop() |
23 | Message.Text:Destroy() |
25 | if Ball:onTouched(Goal) = = false then |
26 | Message.Text = "Whoa, that sucked!" |
27 | BoooSound.SoundID:Play() |
29 | BoooSound.SoundID:Stop() |
31 | Message.Text:Destroy() |
This script is for a soccer game. So the script is like, when the ball touches the goal.. There is a message that says "GOAL!!!" and has a sound to it. If it doesn't, It says "Whoa, that sucked!" thats if Ball:onTouched(Goal) would equal to false. Any help?