local name = "ball" -- ENTER NAME OF BALL/PUCK THAT WILL TRIGGER A GOAL local showGoalMessage = false local playGoalHorn = true
local debounce = false
script.Parent.Touched:connect(function(hit) if hit.Name == name and debounce == false then debounce = true if showGoalMessage == true then local msg = Instance.new("Message", workspace) msg.Text = "Goal!" end if playGoalHorn == true then script.Horn.SoundId = hornId script.Horn:Play() wait (10) script.Horn:Stop() end game.Workspace.GameValues.HomeScore.Value = game.Workspace.GameValues.HomeScore.Value + 1 wait(5)
end end)