Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Ive been trying forever to make this work?


function Goal()
	GoalCountBlue = game.workspace.SoccerField.GoalCount.Blue.SurfaceGui.TextLabel
	game.workspace.SoccerField:FindFirstChild("Deca1")
	if "Soccer1" then do 
		m=Instace.new("Message", game.Workspace)
		m.Text = "OMFG DID U SEE THAT, IT WAS A GOAL"
		game.workspace.SoccerField.SoccerBall:remove()
		GoalCountBlue = GoalCountBlue +1
		wait(3)
		SoccerBall()
			m.remove()
	else return
		end
	
	end
	
end
end

script.Parent.Touched:connect(Goal)

1 answer

function Goal()
	GoalCountBlue = game.workspace.SoccerField.GoalCount.Blue.SurfaceGui.TextLabel
    game.workspace.SoccerField:FindFirstChild("Deca1")
    if "Soccer1" then do 
        m=Instace.new("Message", game.Workspace)
        m.Text = "OMFG DID U SEE THAT, IT WAS A GOAL"
        game.workspace.SoccerField.SoccerBall:remove()
        GoalCountBlue = GoalCountBlue +1
        wait(3)
        SoccerBall()
        m.remove()
		end
	end
end

script.Parent.Touched:connect(Goal)
function Goal()
    GoalCountBlue = game.workspace.SoccerField.GoalCount.Blue.SurfaceGui.TextLabel
    game.workspace.SoccerField:FindFirstChild("Deca1")
    if "Soccer1" then
        m=Instace.new("Message", game.Workspace)
        m.Text = "OMFG DID U SEE THAT, IT WAS A GOAL"
        game.workspace.SoccerField.SoccerBall:remove()
        GoalCountBlue = GoalCountBlue +1
        wait(3)
        SoccerBall()
        m.remove()
    	else return
	end
end

script.Parent.Touched:connect(Goal)

Try both of these.

This discussion is preserved as it was. New answers, comments, and votes are closed.