Recommendation, use functions (when you loop between the players of both teams, that could be inside of one function and you just call it passing as parameters the team you want to loop through) and :PivotTo()
instead of directly setting the CFrame of something. Also, use variables (to store instances like GameBall
, SoundService
, Teams
, BallSpawn
, etc.
Other than that, pretty good code to have been learning Luau and Roblox for 2 weeks.