Goal = game.Workspace.Goal
Ball = game.Workspace.Ball
Message = game.Workspace.Message
Text = Message.Text
GoalSound = game.Workspace.GoalSound
SoundID = GoalSound.SoundId
BoooSound = game.Workspace.BoooSound
SoundID = BoooSound,SoundId
function BallToGoal()
function onTouched(Goal)
end
end
Ball:onTouched(Goal) -- Defining line 8
if Ball:onTouched(Goal) == true then
Message.Text = "GOAL!!!"
wait(0.05)
GoalSound.SoundID = "http://www.roblox.com/Eminem-Im-Not-Afraid-item?id=131149175"
GoalSound.SoundID:Play()
GoalSound.SoundID:Stop()
wait(5) -- After 5, The message will be destroyed
Message.Text:Destroy()
else
if Ball:onTouched(Goal) == false then
Message.Text = "Whoa, that sucked!"
BoooSound.SoundID:Play()
wait(7)
BoooSound.SoundID:Stop()
wait(5) -- Same thing with line 22
Message.Text:Destroy()
end
end
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?

1 comment
Ok, thank you