I'm trying to make a basic counting script. What is wrong with this?
function Touched(SoccerBall)
Workspace.ScoreBoard.Score1.Frame.RedScore.Text = 1
if Workspace.ScoreBoard.Score1.Frame.RedScore.Text == 1 then
Workspace.ScoreBoard.Score1.Frame.RedScore.Text = 2
end
end
script.Parent.Touched:connect(Touched)

3 comments
Yea I don't have a vast range of scripting knowledge so I just went to the basics. Thank you!
No problem, be sure to accept the answers so that people know it's completed. :)
I recommend adding a line to see if it's name is Soccer ball. With this script, anybody could run into the goal and they'd get a point.