Team only script

error
ServerScriptService.lightning only:10: Expected ‘)’ (to close ‘(’ at line 1), got ‘player’ - Studio - lightning only:10

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character) wait()
		if player.Team == game.Teams.Jay then
			local inputDetector = character:FindFirstChild("InputDetector")
			if inputDetector then
				inputDetector.Disabled = false
			end
		end
	end)
	player:GetPropertyChangedSignal("Team"):Connect(function()
		if player.Team == game.Teams.Jay then
			print("is on jay team")
			player.Character.InputDetector.Disabled = false
		else
			player.Character.InputDetector.Disabled = true
		end
	end) 
end)
1 Like

AWESOME THANKS ALOT it worked! After further testing I will mark it as solution thanks!

Thank also to the other guys from original code :grinning: