I'm attempting to call for a certain function to activate ((Which is Score getting 10 points added each Pin that changes color, unless it wasn't hit.)) But its not working, and I'm also trying to change the text of a textbox to what the score's value is. I need help, like really badly...
Score = 0 function Warlord() workspace.PartSensor.Touched:connect(function(otherpart) if otherpart.Name == 'Bowling Ball' then function Warlord() print(Score) end) end end function Warlord() if workspace.PartScoreBoard.SurfaceGui.Frame.Pin1.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin2.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin3.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin4.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin5.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin6.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin7.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin8.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end if workspace.PartScoreBoard.SurfaceGui.Frame.Pin9.BackgroundColor3 == Color3.new(1, 0, 1) then Score.Value = Score + 10 else end